If your WH got too hot, it sounds like the upper level thermostat
failed which may have caused in the case of an electrical unit element
failure or tripped breaker, or in case of a gas unit, dammage to the
burner. In either case it may still be covered under warranty, check
for documents or a label on the heater about the warrantee.