Starting in my mid 40s I had occasional terrible back spasms/strains whatever’s. They were awful. Rest, heat, anti inflammatory OTC meds helped.
I’ve started to do a lot more exercise in the past 18 or so months (since Covid hit) and try to do a bunch of core and stretching/yoga/Pilates type stuff along with weights.
That has helped a ton. Good luck to you