If you feel pain in the low back during the hip flexor stretch try the following adjustments:
1) Don't go as far into the stretch and feel for stretch in the front of hip or thigh. If you push too deep into the stretch, you are likely to put yourself into anterior tilt and excess lumbar lordosis which will result in pain.
2) Keep your abs more engaged / keep your tail bone tucked more. There is no 100% universal answer to how much to tuck or how much to use your abs. Experiment to make sure your low back feels stable when doing the stretch.
3) Adjust your elevation. For example, if you're doing a standing hip flexor stretch, try putting your front foot on a step or stool. This may help you feel the stretch better (because it will feel safer).
If you're doing a kneeling hip flexor or quad stretch, you may want to put extra cushion under the knee to increase that knee's elevation from the floor.