This is a trick I found a while back. When I stop doing it my posture deteriorates and my lower back starts hurting. There are other things/exercises that help posture and lower back pain. I highly recommend Stuart McGill’s “Back Mechanic”. It helps me.
The stretch is called a quad stretch. Here is a YT of a standing version. You can also do it lying down on your stomach or your side, also kneeling. But if you are standing and have balance issues be sure to hold onto something steady … a wall or a chair or a pole. You don’t want to push it to where you are in pain. Over time you will be able to do a deeper stretch. Work up to 1 min. (this may take a month or more.) You can do it several times a day too.
arthritis-health.com/video/...
I stand between two barstools to do my stretch. I hold onto the back of one while I put my foot up behind me on the seat of the other. I don’t have to hold my foot that way and I am stable.
If you can take a look at your side posture before and after the stretch to see if you notice a difference.