In the older days sensors for gauges worked using the Bourdon Tube.
But today sensors use the electrical method for the gauges.
Your gauge is actually reading the voltage that is being sent from the coolant temperature sensor since as the coolant temp sensor increases the voltage sent to the temperature gauge the hotter the coolant gets.
The coolant temperature sensor is a sealed unit that works by variable resistance.
As the engine warms up the resistance in the sending unit is lowered gradually until the system reaches maximum heat. The coolant temperature sending unit is the "ground" portion of the circuit.
In the completed circuit the battery voltage passes from one side of the gauge, through A bimetallic spring and then on to the sending unit, which is grounded to the engine.
When the engine is cold the resistance is high, so little current passes through the gauge. This small current doesn't heat up the bimetallic spring, so the gauge reads a low temperature.
But as the engine warms up and the coolant warms up and the sending unit's resistance lowers more current passes through the gauge and the needle reads higher and higher because the bimetallic spring expands further.