Compare cold and hot water at the same faucet. Hot-only odor points toward the heater; odor in both hot and cold water points back toward the incoming supply, where well-water sulfur treatment may be relevant.
Why the heater can create sulfur odor
Water-heater conditions can support reactions that generate hydrogen sulfide, especially in systems with certain anode-rod chemistry and sulfate-reducing bacteria. The result is a rotten-egg smell that may be much stronger in hot water than cold.
The simplest diagnostic test
Run cold water into one clean glass and hot water into another from the same faucet. Smell both after allowing obvious chlorine odor to dissipate. If only hot water smells, do not start by shopping for a whole-house sulfur filter.
If both hot and cold smell
Then the incoming water source becomes more likely. Private wells can contain hydrogen sulfide or sulfur bacteria, and treatment depends on concentration, pH, iron, manganese and flow. Start with the well-water sulfur guide.