Answer: cut the power, remove the wires and replace the thermostat with a compatible model.
Unlike the other elements of the hot water tank, such as the resistance (which is inside the cumulus), the thermostat is probably the easiest part to change since this part is removable and independent of the rest. The thermostat is generally located at the base of the cumulus. You must start by cutting the power supply (to avoid any mishap) and remove the thermostat wires, taking care to note their location (so as not to be mistaken then). Remove the thermostat and replace it with a new thermostat compatible with your water heater, which is preferably of the same brand and the same reference as the previous one. You should easily find one in the trade, if in doubt ask the seller for advice. You too, send us your brico question