Is it safe to say, you have a fuel gauge in the dash and a sending unit in the tank?
If so, is the sender in good condition?
If all is OK then....
One wire is for switched power.
A second wire is for ground.
A third wire is for illumination.
The fourth is for the connection to the sender.
If my mind is still straight, it works (sometimes) like this.
Turn on the key, power is sent to the switch.
The sender completes the ground and the gauge registers a highly accurate account of your fuel on board.
The sender should have two wires attached.
Of course this depends on the sending unit.
Newer units come with a two wire harness attached and the center post covered. One wire goes to the gauge sender post and the other attaches to the ground lug on the tank.
Older models still use the two wire setup but connect to the center post of the sender and are separated by fiber (insulated) washers.
The sender acts as a rheostat in completing the ground.
Fuel and time, along with moisture destroy the sender windings on a regular basis. That's why I asked about the condition of the sender.
Trick is, figuring out what wire is which.
The light should be fairly easy to recognize.
The post with the "S" is the...... sender.
The post with the "GRN" should be..... ground
And the last one should/might have an "IGN" is the.... switched power.
Look close and you should see the marks.
Remember, if it don't work, it's probably a bad sender or... your tank is empty.
Good luck.