There is a thread here that may be of interest:
The OP is from 2018, but the thread has been revived several times and has quite a few informative recent posts. In particular, see my post #263 with a link to a good article about multifocal intra-ocular lenses (the kind implanted during cataract surgery).
Short version: Cataract surgery removes the natural lens from the eye and replaces it with an artificial one. The patient therefore has the option of getting a lens focused for near vision, far vision, or any other distance. Or alternatively, for extra cost, one of the newer type of multifocal lenses, but they have downsides and are not for everyone. My personal choice when I get cataract surgery (in one eye) is to opt for a lens that matches the other eye, instead of getting into riskier territory. So I will still be near-sighted, and will wear my customary glasses for distance vision.