Dog’s usually shake when they come out of the water so anything in the ear will come out. Just dry their head and ear flap.
Mine has had ear serious infections especially after swimming in chlorinated pools are lakes that have algae blooms. As a precaution I now treat post swim (unless we're at a 12K lake) with Epi-Otic Advanced or Trizultra+Keto. Of course every lab has different sensitivities. Mine is with his ears.
Tilly, our second lab had yeast/bacteria ear infections, that we saw the first time after swimming. We think she possibly had a food allergy, but were never able pin down a specific cause. we treated her ears with Epi-Otic, or Keto on a pretty regular basis. Our other two Labs never seemed to have any issue at all. FWIW, Cooper and Ginger had more forward facing ears which may have helped them dry out. Tilly had had more Bench style ears that lay close to her face.