I get the exact same thing you describe.
One side pulls and I hunch over to the left and I’m in agony. I get back spasms. They last a day or two.
My solution is to start with ibuprofen gel on my back. Then I have a bath and try and do stretches.
When I can walk I go for a sports massage or osteopath depending who can see me first. One session usually fixes me and then I recover a day or 2 later.
The key is to keep doing the stretching but sometimes life gets in the way or I do an arkward move that just tweaks my back.
My problems are caused by sitting at a desk too long. I’ve recently changed jobs to avoid a desk and touch wood, it hasn’t happened again.
A Dr will just prescribe you naproxen (anti inflammatry) and refer you for physio which won’t be for 6 months. Physio shows you how to do stretches to build core strength.