Whether you're a beginner or a pro, whether you have a keyboard or a grand piano,
good posture is a really important aspect of learning to play. Good posture is fundamental to developing correct technique, and making you a better pianist because it will ensure that you are set up for practising/performing well, and for longer, minimising the risk of injury.
Here are my top 5 tips for good posture at the piano:
1) make sure your back is straight and shoulders are relaxed, and neck is in line with your spine (try not to crane your neck forward)
2) both feet are flat on the floor (if you can't reach the floor, place a few books under your feet)
3) fingers are rounded (not flat)
4) forearms are at right angles to the floor
5) sit 'perched' on the front half of your stool / chair
For more reading, take a look at this brilliant site https://www.libertyparkmusic.com/essential-tips-maintain-good-piano-posture/ which goes into more detail about the reasons why good posture is so important.