Thermocouple has 2 ends. One end attaches to gas control valve, other end sits inside the pilot flame.
Flame heats thermocouple, causing tiny electrical current that is detected inside the gas control valve and keeps the gas valve open so water heater can turn on when thermostat calls for heating.
If pilot goes out, then no electric current reaches gas control, and all gas to burner and pilot is shut off.
If pex line burst, that implies very high pressure, caused by closed system with check valve that stops expansion, or possible clog in the water line, or high local water pressure, or clogged factory-installed heat traps.
Put pressure gauge like BTG100 on the drain valve to check pressure, should not exceed 80psi, install pressure reducing valve on cold water line, install expansion tank on cold water line. Remove heat traps and install ordinary pex-lined di-electric nipples from hardware store.
If the water was super hot, then overheating could have caused the pipe explosion.
However the gas control thermostat is ECO protected, and if ECO (energy cut off) trips because of high heat detected inside the tank or combustion chamber, the gas control will trip off and no longer work, gas control needs to be replaced. Some newer electronic gas controls can be reset, but that type heater uses a thermopile instead of thermocouple.
Thermopile is basically a group of thermocouples, that product more electric current that is used to power electronics inside the gas control valve, which issues an error code on the gas control, and some day will send a text message each time out-of-range event occurs.
Copy following links for troubleshoot resources, including troubleshoot by type of gas control valve:
If you need further help, I’m available over the phone at https://www.6ya.com/expert/gene_9f0ef4df2f9897e7