The bristles on electric toothbrush heads are designed to work for around 3 months under normal use, but "normal" is the key word - if you're brushing twice a day for two minutes each time, that's different from someone who barely uses theirs. The recommendation isn't just marketing. Bristles genuinely do get bent, frayed, and less effective at cleaning, and they can start accumulating bacteria in the grooves even when they look decent to you. But here's the thing: your dentist saw your teeth and gums and didn't mention problems, which matters more than any general rule.
The 4 months you're at isn't drastically bad, especially if your oral health is actually holding up. If you're not seeing gum inflammation, your teeth feel clean, and your dentist isn't concerned, you're probably doing fine. That said, you could probably feel the difference yourself if you switched to a fresh head - most people notice that the cleaning feels sharper and more thorough. If you want to split the difference and not feel wasteful, swapping every 4 to 5 months instead of religiously sticking to 3 is reasonable if your dentist isn't pushing back. Just pay attention to how your gums feel. The moment you start seeing any redness or if your teeth don't feel as clean, that's your signal to switch sooner.