Don’t rush to add upgrades to your ships simply because they’re available. Wait until the additions and upgrades are necessary before you spend credits that could go to upgrading planets or space stations.
Battleships need only enough upgrades to safely handle the Cerberus ships guarding the red star systems you find. Transports should be upgraded so their transport capacity (cargo bays and overall weight) can handle artifacts coming from the red stars you discover. Miners should be upgraded only when they’re unable to keep up with the hydrogen demands of your fleet.
The Sanctuary upgrade module is a great contingency for your ships. Any ship you were about to lose in combat or to a supernova jumps back home instead.