Guitar posture is major for playing guitar comfortably and avoiding potential injuries in the future. here i share some thing that help you.
Sit up straight , Keep your guitar at the right height, Rest the guitar on your leg, Hold your arms at a comfortable angle, Use a footstool.
This will help a lot to get a good posture.