A gas water heater that stops heating is usually one of four things: the pilot or ignition, the flame-sensing circuit, the gas valve, or the air and venting the burner depends on. The order of diagnosis matters, because replacing parts in the wrong order is how a cheap fault becomes an expensive one.
Pilot and ignition
A standing pilot that will not light points at gas supply, a blocked orifice or a control that has failed. One that lights and then dies points at the sensing circuit: the thermocouple or flame sensor is not telling the valve that a flame exists, so the valve shuts the gas off as a safety measure.
Electronic ignition units have their own sequence and their own fault codes, and the code is read against the model's manual rather than interpreted loosely.
The gas valve
The valve is the last part in the chain and the most expensive, which is why it is tested rather than replaced on suspicion. A valve that is being told to close by a failing sensor will look like a valve fault until the sensor is checked.
Air and venting
A gas burner needs combustion air and a clear flue. In a tightly closed cabin, or one where a closet has been sealed, the air supply can be marginal. A blocked, snow-covered or incorrectly sloped vent changes the draft, and a downdraft can put out a pilot repeatedly.
This is a safety area, not a performance one. Carbon monoxide has no smell, and a venting fault that only shows in certain wind conditions is still a fault.
What an inspection covers
The county's water heater inspection standards name combustion air, vent termination and clearances among the things checked on a gas installation. Those are also the things worth checking on an existing installation that has started behaving badly.
Propane on this corridor
Much of the housing here runs on propane rather than piped gas. Propane units use different orifices and settings, and a unit that has been converted needs the correct conversion kit. Confirming the fuel before ordering parts avoids a second visit.