The best posture is your next posture. The human body was designed to move, not to stay in any one position for long periods of time. Muscles and ligaments “relax” into a position after about 20 minutes; this means that they get used to being shortened or stretched within 20 minutes, and the more time we spend in one position, the more used to that position the body gets, and the less likely it is to move out of that position at rest. In that sense, posture is a habit—your body will choose the position that it’s used to, and comfortable with, which can create pain and dysfunction because of the muscles that are continuously shortened or stretched.
Now, when we’re required to be in one place, like at work, there are “better” postures and the ideal posture is one where if you were to relax completely, your body would not move because it is supported. This means sitting comfortably with your weight even between your “sit bones”, your feet flat on a surface (the floor or a foot support), your knees and hips bent to 90 degrees, your spine upright and supported by your chair, your arms resting comfortably with your shoulders down and not rolled forward, and your head being centered over your shoulders. Most of us are unlikely to spend a lot of time in this position, so it’s a good idea to take frequent breaks, not sitting in one position for too long.