Make SURE that you put replacement lamps in there that match what was OEM.
Putting anything other than OEM specified lamps requires a bit of research or you could end up disappointed with the result.
There are a LOT of bulbs on the market that claim to be "better".
I'm sure you have seen some of them out there that fall short of that....
REALLY blue lamps that are not as bright as they should be.
BRIGHTER lamps that blind oncoming drivers and have a SHORTER life.
Of course, high beams WILL blind oncoming drivers and need to be dimmed anyhow, so the margin of error here is greater than for low beam lamps.
LOTS of marketing garbage out there to sell you something that may or may not be even as good as OEM.
LED replacement for high beam is not just a plug and play if your high beam is used for Daytime Running Lamp function as is the case with my 2016 Camry.
If I put a LED bulb in my high beam without the additional modifications (can be done easily) then my Daytime Running Lamp function would not work.
Also, all LED headlamps are not created equally by any measure.
Some can fail early, some can give you a less than ideal light pattern out in front of your car, even blinding oncoming drivers.
You want to get a lamp that is going to last and will give you the correct beam pattern out of the lamp housing.
Again, LOTS of marketing garbage out there.
I DID install LED replacements for my low beam bulbs and experienced a significant improvement over the halogen bulbs that had been in there. However I did my research before buying. My 2016 has projection headlamps for the low beam.
I left the high beam lamps alone with the factory halogen bulbs. I did not have any issue with how they were working, so I saw no gain in changing them.
As others have mentioned, use care to avoid touching the bulb when changing as oil from your skin will cause "hot spots" on the glass that can result in what you ended up with.
Without knowing the history of the bulbs you had in there, it is hard to give a good answer as to why they failed. So I can only offer a couple pointers as to what to replace them with.