Once I worked too hard trying to get some bad software installed. I clenched my teeth and cracked two molars. One molar soon got a root canal procedure and a crown. Some years later the other cracked molar got sore. Apparently the crack let bacteria into the core of the tooth.
One day about each 30 minutes, the pain was awful. Eventually the explanation was that the bacteria generated CO2; that built up pressure inside the tooth and pressed on the nerve; at the peak of the pressure and pain, finally the CO2 escaped out the crack and the pain went away for another 30 minutes or so.
I tried this and that. It was a weekend, and I had a dental appointment on Monday, but for the weekend the pain was beyond belief. I called around, and eventually a sympathetic person in a hospital emergency room explained that people commonly rushed in for opioid prescriptions. No such thing occurred to me at all.
But eventually I just drove to an emergency room and said "I'm fine now, but in about 30 minutes I will be climbing the walls in pain."
They let me stay and wait. When the pain started, right away the attending physician dipped a Q-tip or some such and painted my tooth. Pain gone.
He explained that he just used benzocaine which is the same as dentists use just before giving an injection of a stronger local anesthetic and is over the counter and not very expensive. GOOD!
The dentists had told me to take one of the standard aspirin alternatives -- I did;
took enough to threaten damage to my kidneys; and it was useless. Not good dentists.
So, I left the emergency room with a bottle of benzocaine and a prescription. I looked at the prescription -- it had lots of super serious markings about a controlled substance, special numbers, etc. Okay, maybe it was an opioid. No thanks.
I rushed to a pharmacy and stocked up on little bottles of benzocaine and Q-tips and didn't suffer again. At the dentists on Monday, I still didn't like their work and walked out.
In a few days, the pain quit. A week or so after that, the tooth was loose. A few days after that, an oral surgeon extracted the tooth. No problem.
So, sometimes, really, whenever possible, to heck with opioids. Instead, just get some benzocaine for the night or the weekend and then go for some good medical care. As far as I know, I never took an opioid. Dangerous stuff.