Other than ingesting alcohol and narcotics in sufficient doses to induce a state of analgesia, for most of its history, people in the West got through surgery with the aid of little more than forcible restraint and grit.
Drugs and alcohol were well known in the ancient world. Artifacts depicting opium poppies dating back to 4,000 BC have been found in the Levant, and evidence of Sumerian beer production dates to nearly 3,000 BC.; furthermore, henbane (Hyoscyamus niger), a member of the nightshade family, has been used to alleviate pain since the Babylonians began using it on toothaches around 2,250 BC.
After reading that, you’re liable to be thankful for living now versus 50-100 (or more) years ago. Similar to fermented food, a lot of people suffered or died getting us to this point. It’s not perfect, but it’s better.