Back problems can be very complex and usually come from compensating for weakness or lack of flexibility lower in the chain; ankle/knee/hip/back. Depending on what the issue is, strengthening your back/core can exacerbate the problem. Start from the bottom, ankle, and if needed, get someone knowledgable of biomechanics and figure out which areas lack strength or flexibility. Doing this can help pinpoint why and how the back is trying to compensate. In other words, tight hamstrings or glutes which frequently result in back issues, can be caused by ankle inflexibility. Stretching is far more useful if done through resistance (I would argue this should be the only stretching needed). Exercises like nordics, reverse nordics, seated good mornings (cable are best), Jefferson curl, and others. Squats and deadlifts are awesome exercises but without proper ankle mobility will absolutely lead to back issues even if it exhibits as knee problems. Hip flexor/psoas tightness are also frequent contributors to back pain. Again, increasing range of motion thru resistance should be the goal and absolutely will alleviate pain, sometimes very quickly. But start at the bottom and analyze up the chain.