First, you'll want to farm a ton of Cobalt (5,000 or higher would be best). This is easily done if you find a planet with Vortex Cubes on it, each cube gives you 1 Tetracobalt. Refining it gives you 250 Cobalt per Tetracobalt (it might be more, I don't remember).
Once you have all your Cobalt, fly to the space station and go to the market. Sell all of your Cobalt, crashing the market. Once you've done that, you'll be able to buy back more Cobalt than you spent for less than you sold it.
If that's confusing, here's an example.
Sold 5,000 Cobalt for 10,000
Bought 7,000 Cobalt for 1,000
Then move to the next star system and repeat.
Oh, I was talking about the price of Cobalt.
But yeah, it can take a bit but as long as you have a freighter or a decent Explorer then you should be fine.
I’m still vibing with the original ship you have, mainly because I don’t know how to get another one, aside from buying.
[spoiler]Hecking Spitfires[/spoiler]