So often I find people have adopted poor postural habits and created rounded shoulders. This can be untrained!
One of the things you can do for this is stretch out your pec muscles. You can do this against a wall. Place your arm on the wall and gently turn your body away. Make sure you feel the stretch in the chest and are not just pulling your shoulder out of it's socket (make sure you draw your shoulder blade down first before moving into the stretch). It should feel like a subtle stretch, never force a stretch or move into pain! There are two versions (one with arm bent & one with arm straight up) to target two different pec muscles. Do both.
Follow it up with this exercise 👉...this is a static hold and has been adopted by Mike Fitch of Animal Flow which he calls the Static Crab. In this position you want to start with your bum seated on the floor and push the ground away from you to lift it off. Keep your chest open & your neck neutral, also maintain a neutral spine, start by holding for 5secs and then work your way up as you get better at it.
This is a great movement to train your lats; lower traps & triceps to activate whilst your pec minor muscles are in a lengthened position, putting them at a disadvantage to contract. Over time you will notice a change in your overall posture and find that you automatically correct any slouching. This is just one of many ways to improve posture. Give it a go!