Sender units are usually but a variable resistor that is actuated by a float on an arm.
The need 2 wires one of which is positive. Shorting the 2 should read 'full' at the gauge.
Often rust is often what renders the sender inoperative.
Early units often used cork as a float which could get waterlogged, more recent ones used plastic.
Often replacement calls for removing the tank for access in which case an alternate DIY is a calibrated dip stick.