the c172k, and most vintage aircraft, stock gauges and senders operate on the SW standard 30-240 Ohm range. the sender is simply a variable resistor moved up and down by the float, varying the resistance/Ohm from the ground wire to gauge 'sense' terminal.
But if you mix OHM ranges of sender and gauge, such as a 20-240 sender to a 0-90 Ohm gauge, it won't work.... again. most are the standard SW range, but not always, especially possible if newer gauges were installed from a salvage yard.
good news. it's easy to trouble shoot.
my suggestion...
1. there are 2 wires at sender...one is common ground other goes to gauge. take the gauge wire and ground it to tank....this sends a signal of less than 30 ohm... this should result in gauge going full....if not, the issue is likely either a open wire to gauge or wrong ohm range gauge, or bad ground wire at sender.
2. if u still have another or old operating sender, use jumper to connect the same wires on installed unit...if the gauge move proportionally when you move float, the wires likely good and likely a mismatched sender vs gauge range. most senders wear out windings near mid level as that's where level usually is (the friction between wiper and winding wears out) so you may not get good gauge reading mid travel, but should be work accurately at empty and full ..
3. to check if sender is working you can simply use a cheap multi meter to display ohms between the sender 2 connections....you should see less than 40 at full position, and more than 200 ohm at empty. compare the readings between both genders to confirm match. if you don't get any gauge movement, recheck wires at gauge .
4. if you have extra wires hanging around... jump the wires at bad tank sender to the terminals at other tank sender (b sure to remove wires at both senders or you will add resistance and get inaccurate readings)...you are simply hooking up opposite sender to gauge ...you should see the same level as before for that tank.
if you need more help, PM me with your tel # if I can help.