Electric Water Heaters
Electric water heaters are very simple and easy to repair. There are only four electronic parts, two elements and two thermostats. Replace them, clean out the sediment, and your water heater will work like new. If you have no hot water, and you have power, reset the upper thermostat and replace the upper element. If you have a shortage of hot water replace the lower element and possibly the thermostat. Clean out the sediment if needed.
Electric Water Heater Trips Breaker and How to Change Element
Water Heater Leaking? Top 5 Fixes
How to Replace Electric Water Heater Parts
Gas Water Heaters
Gas water heaters with the older mechanical gas valves are very reliable, inexpensive to fix, and east to understand. The main problem you will have is the pilot light not staying lit. Remove the burner assembly, replace the thermocouple, clean the air filter (if needed), replace the igniter (if needed), clean the pilot light gas tube (if needed), and reassemble. You will rarely have a problem with the actual gas valve.
If you have an electronic gas valve, good luck. They use flashing error code lights on them and have thermopile parts. Typically you can't buy them individually and will need to special order the whole burner assembly. This may not fix the problem because their gas valves have circuit boards in them and they are expensive and are less reliable.
Top Ten Water Heater Pilot Light Problems
How to Troubleshoot Water Heater with an Electronic Gas Valve
How to Clean a Filter
Leaking Carbon Monoxide