Generally speaking, swimming has no direct effect on eye sight, but swimming may cause the eye to develop lesions such as keratitis, which, if severe or untreated, may cause scarring of the clear cornea and affect vision.
The water quality of swimming pools is up to standard, and you should take good protection when swimming: wearing good quality swimming goggles, swimming generally does not have a negative impact on your vision.
When swimming water is contaminated, there may be a large number of bacteria or other pathogens such as viruses, and when swimming, the bacteria may invade the cornea and conjunctiva leading to keratitis, conjunctivitis and other lesions. If the corneal lesions involve the stroma layer or even deeper, it may lead to corneal scar formation and affect vision.
Therefore, if you experience redness of the eyes, increased secretions, blurred vision, etc. after swimming, you must seek medical attention promptly.