Myofascial release ball and or foam roll glutes, rhomboids and rotator cuffs a lot.
Lifting regularly has really fixed my posture. Bar the odd injury due to bad form and tight hamstrings. Work on core and mobility before starting to lift heavy.
Seeing a physio every so often is worth its weight in gold. There are lots of prehab things that can be done but its still worth seeing an expert. You only get one body and it is not meant to sit all day.