While visual changes from cataracts are probably more likely, it is possible that zoloft (generic name sertraline) could be causing your improved viion. It would be very unusual, as much more commonly it causes blurred vision rr double vision.
Visual changes produced by serotonin reuptake inhibitors have become a subject of greater attention in the past few years.
See
Antidepressants, Anti-anxiety Meds & Your Eyes
https://www.bettervisionguide.com/antidepressants-anti-anxiety-meds-your-eyes/
Monitor the eyes for ocular effects from antidepressants, anti-anxiety medications
https://www.eyeworld.org/monitor-eyes-ocular-effects-antidepressants-anti-anxiety-medications
Keep an eye on the SSRI: help avoid possible sight-threatening adverse events
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4723200/
Drugs for the Mind Affect the Eye
https://www.reviewofoptometry.com/article/drugs-for-the-mind-affect-the-eye
Ocular Effects of Serotonin Antidepressants
https://ww2.health.wa.gov.au/-/media/Files/Corporate/general-documents/WATAG/WAPDC/Serotonin-antidepressants-ocular-effects.ashx
These effects are thought to be mediated through anticholinergic mechanisms for some antideressants (tricyclics and partoxetine especially) as well as via serotonergic mechanisms mediated by 5HT2B/C receptors and 5-HT7 autoreceptors in the iris-ciliary bodies.
sample papers
Serotonin-2B/2C Receptors Mediate Bovine Ciliary Muscle Contraction: Role in Intraocular Pressure Regulation
https://www.researchgate.net/publication/322691582_Serotonin-2B2C_Receptors_Mediate_Bovine_Ciliary_Muscle_Contraction_Role_in_Intraocular_Pressure_Regulation
[3H]-Serotonin Release from Bovine Iris-ciliary Body: Pharmacology of Prejunctional Serotonin (5-HT7) Autoreceptors
Ciliary muscles are also be effected by catecholamines (norepinephrine or dopamine) , and some neuropeptides such as neuropeptide Y are also active which may be modulated indirectly by serotonin.
Morphologic characteristics of the human ciliary muscle
https://www.sciencedirect.com/science/article/abs/pii/S0014483501910127
Anything that can distort your vision could also correct it, if one's underlying ocular abnormality could be normalized through the action of the drug that usually produces burred vision. It would be highly unusual, but not impossible. If you discontinued sertraline or change to a different medication and your vision problems returned, it would provide further evidence of the link. I do not however, at all recommend going off the medication or switchung to a new medication if sertraline in working well for you just to check your vision. It might be work a trip to the ophthalmologist or optometrist to discuss it though, as well as consider other causes.