Replace the failed fitting or valve
Fits when: A leak that is traced to a connection, a supply connector, or a drain valve, on a tank with no signs of corrosion.
Trade-off: The smallest intervention, and it restores the unit properly. Worth confirming the tank is genuinely sound at the same time, because a heater is rarely inspected except when something has gone wrong.
Investigate why the relief valve is discharging
Fits when: Water from the relief discharge pipe, particularly if it happens repeatedly rather than once.
Trade-off: Sometimes the valve itself; sometimes thermal expansion with no expansion control, or a thermostat running too hot. Replacing the valve without answering which is why the same symptom returns, and blocking it is never an option.
Replace the unit
Fits when: Water coming through the tank body. The steel has corroded through and there is no repair for that.
Trade-off: The whole appliance, and usually a chance to correct the installation — a drain pan and a route for it, strapping, venting and expansion control all get looked at as part of the work rather than separately.
Deal with the water damage as its own job
Fits when: Water has reached drywall, baseboards, carpet, or a subfloor — which an indoor unit without a pan makes likely.
Trade-off: Separate from the plumbing and frequently larger than it. Material left damp behind a repaired appliance is how a fixed leak turns into a persistent smell weeks later.