You may be thinking of your thruster rating, higher thrusters have higher optimal/maximum masses (wish I was at my comp, odd how quickly one forgets the outfitting screen). Max cargo capacity is as stated above.
It is not clear what do you mean by "ship mass". You can increase mass of the ship itself by buying for example better bulkheads, B class equipment etc. But more ship mass = lower jump range.
If you mean that you want fly with more tons of cargo, you need to buy cargo racks for your Cobra.
If you want to have the ship which itself have more hull mass, you need a bigger ship.