Rotten egg, hot and cold
This usually means sulfur in the source water rather than anything the water heater is doing.
Hydrogen sulfide dissolved in the supply comes through every tap in the house, so the heater is only carrying what is already arriving.
Look for the smell on the cold tap as well as the hot, the same smell at an outside spigot ahead of any equipment, and no change after the heater is drained.
Do not buy an anode rod or a carbon cartridge for this. The rod only affects the hot side, and carbon loads up fast on sulfide and starts passing the smell through.
Related: rotten egg, hot side only and rotten egg plus black slime.