A storage tank is a simple machine: a steel vessel with a lining, a burner or elements, a dip tube, an anode and a set of valves. Most complaints trace to one of those parts, and the pattern of the complaint usually narrows which.
Reading the symptom
No hot water at all. On gas, the pilot, ignition or gas valve. On electric, the breaker, high-limit, element or thermostat.
Hot, then cold quickly. Often the dip tube: cold water enters at the top instead of the bottom and mixes with what is there.
Lukewarm and slow to recover. Sediment, a failing lower element, or a thermostat reading low.
Popping or rumbling. Sediment at the bottom, trapping water that boils under the heat source.
Water at the base. A fitting, relief valve, drain or element gasket — or the tank itself.
The parts worth replacing
Anode rods, dip tubes, elements, thermostats, relief valves, drains and gaskets are all serviceable. A tank shell that has rusted through is not.
The anode is the part most often neglected and most worth checking. It exists to corrode so the lining does not, and once it is gone the tank becomes the sacrificial component.
Recovery and sizing
A tank that cannot keep up may not be broken. If the household has grown, or the unit was sized for two occupants and now serves six, recovery is the issue rather than a fault. That is a sizing conversation, not a repair.
When the repair is the wrong spend
A tank with heavy sediment, a consumed anode and a failed element is telling you the lining is on its way out. Replacing the element buys months, not years. The honest comparison is the cost of the repair against the cost of a replacement, and it is worth having before the work rather than after.