Hello fellow bluetooth disliker, I feel your pain. I have owned earbuds from $200 (a gift, I would never spend that much lol) to $2 and no matter how careful I am with them, they all still seem to inevitably short out in the same way. In theory you can repair them. There are a number of tutorials out there. I tried to repair my expensive pair and mostly learned I probably shouldn't be allowed near a soldering iron, but maybe you're more handy than I am or know someone who is.
At this point I have just kind of embraced it and buy cheap earbuds in bulk (whatever's in closeout/discount stores usually) and keep a few pairs in every bag that I own. I've also switched from earbuds to some bulky but heavy-duty headphones for listening around the house (obviously not an option when traveling) which at least drastically reduce the rate at which I go through the earbuds since I'm using them less.
That said, while nothing is immune, there are two design factors in wired earbuds that seem to extend their lifespan at least a little in my experience: Having an L-shape at the connection point, and having an anti-tangle cord. I suspect the L-shape connector doesn't bend as often in the way that causes it to short, and I'm sure every time I have to tug at cords to untangle them I shorten their lifespan. Higher quality and more durable materials last longer, but in my experience, earbuds that cost 10x as much do not last 10x as long, so unless there is a significant quality difference that matters, I go with whatever's least expensive and just look for those physical features instead. Even then there's no guarantee they'll last beyond a few months, so when I see a good price I grab a bunch.
One other thing is that when possible and practical I'll run the cable up under my shirt so there's less chance of the cord snagging on something that I walk past and yanking it in a way that can cause it damage. Maybe it's just my personal clumsiness but this happens to me embarrassingly often if I forget.
Of course your experience my be very different since there are numerous factors that can cause the cables to deteriorate faster and your factors may not be my factors. If nothing else, having handfuls of spare new earbuds on hand can make you a hero sometimes when someone has an emergency need for some and that's always nice.
I do feel bad about how many of these things I have to throw away every year but I'll spare you the grumpy ramble about how quality has declined so sharply over the years and how wasteful it is that these things are basically made to be disposable, etc, etc. Maybe someone else will have a better answer though.