The pelvis is connected directly to the spine via the sacrum, the position of the pelvis has an impact on the positioning of the spine. Pronounced anterior pelvic tilt leads to hyperlordosis (excessive curvature) of the lumbar spine, which in turn increases the strain on the vertebrae of the lower back.
Pelvic misalignment is often caused by muscular imbalances. For instance, weak stomach and buttock muscles (gluteus maximus) cause the pelvis to tilt forwards, which in turn leads to a hollow back. This misalignment can lead to a shortened hip flexor muscles and back extensor muscles as a result.
The causes for an anterior pelvic tilt include:
Sitting down for too long
Wearing shoes with high heels
Excess weight / pregnancy
Unbalanced training programs
Sufficiently strengthened stomach muscles and buttocks and sufficiently stretched hip flexor muscles will help prevent excessive anterior pelvic tilt, as well as bring mindful of hip posture when standing and sitting.
Finally, it should be said that back pain can have many causes. I simply wanted to draw attention to different possibilities.