The test that decides it
A heater in Rancho Santa Clarita is finished when the steel fails: a split seam, a base rusted through. It is not finished because it is old, and a failed thermocouple or element is a repair, not a reason to buy a heater.
The in-between case is the one that fills the diary. The unit still heats, but recovery has gone, showers are short and it rumbles while heating. On water measured at 240 mg/L of calcium carbonate that is sediment on the floor, and flushing recovers most of it while the shell holds.
What the job involves
Drain, disconnect and remove the old heater. Set the new one with its pan and drain where required, strap it in the upper and lower thirds, vent it to the manufacturer's specification, reconnect the supply against its requirements and confirm it heats and shuts off cleanly. Permitted and inspected locally, so the requirement for the address is settled first.
While it leaks
Close the cold inlet and shut the fuel. Do not cap the relief valve, and do not leave a leaking tank above finished floor space while deciding — the water damage outruns the cost of the parts.