Almost all cases of lower back pain that i see, that aren't caused by acute injury, are caused by poor posture. Mostly do to sitting inappropriately in chairs their whole life.
Chronic stress creates inflammation over time, and your body will do it's best to adapt to this stress. Compensating for your weak core by swelling of the spine, engaging the erectors and shortening of the abdomen. Which also results commonly in respirator, neck, and shoulder issues as well as forward head posture.
From a gym standpoint, concentrating on strengthening the core, choosing exercises that place the least amount of stress on your spine. Along with improving your hip mobility and glute/ham function.
It's best to be humble and do less, (volume and intensity) but focus on moving the right way. Remember over your lifetime, your body has gotten really good at moving the wrong way. So you maybe strong and can do 100 pushups etc..... but only because your good at doing it with your spine in the wrong position.
So be humble and learn first. Learn what muscles should or should not be working, and work on doing it right.
Then the hard part, is taking this knowledge of biomechanics and transferring it to real life. Every time you sit down, make sure your are sitting correctly. Every step you take make sure you are walking correctly. Chances are, most of the people reading are slouching in their chair with shit posture. Get your ass back in the seat, with your feet flat on the floor. Quads should be flexed, actively pushing your lower back into the seat. Head should be neutral, not protruding forward, like an old man in the making.
Anti-inflamatorys will help with pain, but won't fix the problem. Take them when needed.
Spinal deloading exercises, properly scaled twisting exercises, and spinal adjustments/cracking your back can also help.