An electric tank losing hot water most often traces to a failed heating element or a tripped high-limit safety switch, both replaceable parts that do not necessarily mean the tank itself is at fault.
A gas unit that will not light usually points to the thermocouple, the pilot assembly or the gas control valve, each diagnosed individually rather than treated as one interchangeable problem.
A North Miami condo’s smaller, closet-mounted unit works harder relative to its size than a house’s larger tank does, so a part failure there can show up sooner in the unit’s life than the same failure would in a bigger system.
A unit still within a reasonable age range, generally under eight to ten years, is very often worth repairing rather than replacing, and that assessment happens honestly before any replacement is ever suggested.