I find that NSAIDS (ibuprofen, Advil, etc.) don’t touch tooth and jaw pain, but Tylenol is extremely effective for it. 500mg totally knocks out any lingering pain from dental work. I often have pain for like, a week while a filling settles in (and it has happened with multiple dentists, so it isn’t the dentist), but I just take Tylenol every four hours, and the pain is gone.
Also, the dentist always props open my mouth with a wedge on the opposite side from the side being worked on, so I can relax my jaw muscles, and my mouth stays open. That way there’s no soreness from holding my mouth open. Ask about this the next time you are there.
Hope your other tooth is still salvageable, and mazel tov on making it through the appointment. You got lucky that this tooth was something simple, so maybe you’ll get lucky with the other tooth as well.