Sometime in 1899, Harry Sharp, a prison doctor from Indiana had the bright idea that he could "fix" habitual criminals, especially those that excessively, uh, touched themselves. His idea was to remove the biological drive entirely. Castration was deemed "too mutilating", so Dr Sharp (ha ha) opted instead on snipping the Vas Deferens, creating some of the first case studies in the effects, techniques and human responses to the vasectomy in humans.
That’s where it all started, but it’s not just for onanists anymore. These days, its a short operation done on sunny friday afternoons with a local anesthetic by doctors more interested in their drivetimes to the cabin than your private behaviors. It’s not that debilitating and you can even drive yourself home from it. Slowly. Anyone can do it! And, there are benefits today that you didn’t get as a prisoner back in 1899. You get three days of freedom from almost any type of lifting, moving, working, etc. You get to sit on the couch all day, not moving. Anything you do should be done carefully. Slowly. Or by someone else. Keep the activity level low and and it’s not that bad.
(You can learn the whole history of the procedure at the comprehensive "Vasectomy Information" website. File this in the "more than you wanted to know" category. )