Could be one of three things, the sender in the tank, the pump control module, wiring from the sender to the cluster, or the cluster.
Last one I had in that did this turned out to be the cluster. Luckily the customer was well into electrics and replaced a couple of chips inside the cluster and the gauge worked again.