Ear infection

My 20 month old has had 3 ear infections and now I think she is about to have a fourth (she’s seeing doctor tomorrow and I’m certain she’ll probably be diagnosed with another) does anyone have any tips on how to prevent them at all? She wears full covering hat of her ears and she doesn’t remove her hat. I feel bad I don’t know what else to do to prevent them