If you jump into a system and discover "whoops my fuel tank is bone dry", the first thing you should do is STAY PUT. Do not attempt to supercruise to another system, star or planet and only supercruise to a station if you know how to read the fuel guage.
There are a couple reasons for this:
It is not possible to "reach" another solar system in supercruise, the game will not load in the system even if you reach the beacon
It drastically increases your chances of running completely out of fuel and going on emergency oxygen, which makes the Fuel Rats' jobs so so much harder
The further you are from a celestial body, the more difficult it is to pin down your exact position, and this along with (2) complicates any rescue efforts
This has some basis in reality as well: if you are lost, stop moving and wait for help, don't try to wander around aimlessly.
Source: https://www.reddit.com/r/EliteDangerous/comments/qr3zew/psa_if_you_run_out_of_fuel_stay_put/