For prevention, a Mayo Clinic doctor advised me to use daily nasal rinses because I was having trouble with my ears gurgling. He said nasal rinses are the best way to prevent infections. I've been doing them regularly with Covid after being in contact with other people - grocery, appointments, social visits, etc. I don't use the whole bottle each time now and just leave it on the kitchen sink and use it when I come back in the house.
https://www.amazon.com/NeilMed-100-Sinus-Rinse-Complete/dp/B...
Grandma recipe, works for me. Not a medical advice
There is also as theory about germ ingress thru the ears, 2% peroxide in the ear with a content bud has done it for me before.