I worried about this too. I had surgery for a congenital cataract at 27 or so. I was conscious-ish and remember hearing the surgeon talking and doing something to my eye, but they put you on some _wild_ drugs and I absolutely did not care.
Not to worry there, either! I think the drugs are pretty standard, are not opiates, and honestly I think that most humans understand that “if you’re gonna poke me in the eye, at least make sure I’m good and sloshed” is a pretty reasonable ask.