Gas: Pilot Out or Thermocouple Failure
On a gas unit, a pilot that won't stay lit is almost always the thermocouple. It's the small sensor that tells the gas valve the pilot is burning. When it wears out, the valve shuts the gas off as a safety measure and you get no hot water. It's one of the most common failures we see on older gas tanks and usually a same-visit fix.