The upper images are an example of poor sitting posture. When seated, your chest should be lifted, to avoid rolling the shoulders and slouching forward. In addition, you should not lean back too far putting your weight on your tailbone, as that may lead to low back pain. Try to keep your feet directly below the knees.
Sitting well starts with a good chair. Choose a chair with a firm, flat seat. Place your feet flat on the floor with your thighs parallel to the floor. Sit on your sitting bones, not your tailbone, with your chest lifted and shoulders pressed down below your ears (bottom images). Assess your seated position throughout the day and alter as needed. If you knees are higher than you hips, add a blanket or cushion below your bottom.