Fuel gauge only working sometimes

You can also have a problem at the large round pin connector on the circuit board itself. .

Exactly. Which is why I suggested checking, as to separate the problem into front/ cluster? or rear/ sender?

There is "not much" that is NOT common to all the gauges, IE temp / fuel, or temp / fuel / oil in case of a Ralley cluster.

The gauge, the studs at the gauge or the pin as mentioned for the sender wire. I spose it's possible even the gauge itself.

MAKE CERTAIN the temp gauge is unaffected.