Or have you accidentally jettisoned all your cargo? Default bound to "end" rebind it somewhere else is a good idea.
So are you looking at your cargo screen, and it says your holds are empty? Or are you at the commodities market and you don't have anything to sell? If you are carrying cargo that is illegal in the current station, it won't show up at the commodity market. You have to go to Contacts, and Black Market to sell it. Or there could not be a commodity market at the station (usually only outposts).
Maybe you are taking heat damage at a star. The cargo hatch is very prone to spewing your cargo if nudged
Or have you accidentally jettisoned all your cargo? Default bound to "end" rebind it somewhere else is a good idea.