Good that you’ve noticed!
What you’ve described is the common lordosis posture distortion that many folks in chair-sitting cultures start to manifest sometime in adult life, due to postural habit patterns developed by being confined to chairs, desks, cars, etc. that then affect movement habits as well (in weight lifting, moving the body, etc). It has to do with esp the psoas muscle, the core transverse, the spine - and often is compounded by weak connective tissue due to the SAD food culture, and also some degree of abdominal muscle separation (PT/RN Julie Tupler says 99% of adults in modern society have this issue!).
And what heals this is in restoring alignment in both movement and sitting, and developing lots of postural awareness from the inside out. There are a number of simple yet powerful techniques from the realm of Movement Ecology/Biomechanics, Yogasana, and the Alexander Technique can help - and some physical therapists are trained in these specialties. It’s beneficial to work with a really good PT of some kind.
These techniques are practiced best when combined with also working on your barefoot awareness and foot foundations - because they’re also part of your core and upper back! Working with these techniques daily trains the muscular support of the entire body, anchors your core, and corrects your upper body posture over time - by learning how to be embodied and move in a more natural way.
For postural training/support foundations while getting up and down anywhere, relax the ribcage down and imagine it capable of settling back towards the spine rather than forward, and engage your transverse abdominal muscle (on an exhale really squeeze the belly button inwards towards the spine - then inhaling naturally etc).
Lengthen the upper back simply by opening the chest (letting the shoulder blades come closer to each other, but not hypercontracting them).
Last but not least, release and lengthen the neck (basically the peach technique Safi desrcribed above): tuck your chin down slightly, and then pull it in towards the neck a bit. Lengthening the neck like this corrects a jutting or lifting chin, and it’s something one brings awareness to each day, for the rest of one’s life. With a lengthened neck, you can then bring the head a little bit back and feel the tension dissolve in the shoulders.
These techniques help you bring the posture back into a natural alignment. They all counter the lordosis tendency from chair-sitting posture habits and old injuries/torsions. Just learning the principles and bringing awareness to how the breath works with the bones and muscles to support, gather in, and lengthen/expand can start lots of fixing!
You might enjoy this book: