The worst time to make a water heater decision is the day yours quits. When there's no hot water and the family is waiting, it's easy to feel pressure to say yes to the first option you hear. A water heater replaced on your own schedule usually gives you more room to choose.
The better time to call is at the first sign something's off. Maybe the water isn't as hot as it used to be, it runs out sooner, or the pilot needs relighting. You might also see a little rust at the base or some moisture where it should be dry. Calling when you notice one gives you time to figure out whether a repair is worth doing, whether the tank's age makes replacement the better choice and whether your household has outgrown the size.
Sometimes the fix is genuinely small, a part or an adjustment. Sometimes the tank is near the end, and knowing that early lets you replace it on your terms. Either way, you'll get a straight read in plain English, and the decision stays yours.