Most complaints about hot water are not about the water being cold. They are about there not being enough of it, which is a sizing question rather than a fault.
A storage system holds a fixed volume and takes time to reheat once it is used. If a household regularly runs out, either the tank is too small for the pattern of use or the recovery rate is too slow for how quickly demand repeats.
A continuous flow system does not run out, but it has a maximum flow rate it can heat. Exceeding it, typically by running two showers at once, produces water that is warm rather than hot. That is the unit reaching its limit, not failing.
What matters for sizing is not just how many people are in a household but when they use hot water. Four people showering across the evening place a very different demand on a storage system than four showering within the same half hour.
It is worth working this out before replacing a unit, because installing the same size again reproduces the same problem.
If a hot water system is leaking, making unusual noises, or delivering water hot enough to scald, switch it off at the isolation point if you can do so safely and call a licensed plumber. Tempering valves and pressure relief valves are not do it yourself items, and a failed relief valve can be dangerous.