Each ship has a hold for resources and commodities. This hold has limited space, you can only fit so much Ore in your ship. You can expand this cargo hold by installing a cargo expander. Also note that some ships have a higher cargo hold of themselves than others.
Not all items are stored in your cargo hold; things like weapons, data chips, festive items, factories and so on don't take up space in your cargo hold.