The first question is whether it ever kept up. The answer splits the diagnosis in two.
It never kept up
Sizing. The household's peak draw exceeds what the tank can recover.
Look at the pattern: the first two showers are fine and the third is cold, every time. That is a capacity curve, not a fault.
It used to keep up
Then something changed:
- Lower element failed: half the usable hot water, suddenly.
- Sediment on the floor: gradually less capacity over a season or two.
- Thermostat drift: water never quite hot enough, so every draw uses more.
- A new addition: an extra bathroom, a bigger household.
The cold-inlet factor
Winter water arrives colder and takes more energy to heat. A tank that is marginal in summer runs out in January. That is not a failure, it is arithmetic.
Testing before buying
Measure the actual hot water temperature at a tap. Check the element or the burner. Flush and read the discharge. Only then decide whether the answer is a part, a setting, or a replacement.
If it is sizing
Choose on first-hour rating for real use. At a pass-side property the choice is often constrained by the vent and the space, so a larger tank in the existing position may be the practical answer, with a mixing valve at the outlet for safety.
What to have ready
Occupancy, pattern, age, temperature.