I’ve noticed that too, especially with the speakers my friends buy. For me, I just look for ones that have good long-term reviews and not just the “sounds great out of the box” stuff. I also try to stick to brands that people say actually last.
I don’t really have a fancy method, but if it feels well-built and not super cheap or plasticky, I trust it more. And I try not to blast them at full volume all the time, that seems to make them die faster.