First things first: there is no ‘right’ posture. In general, though, your posture should be comfortable, help you stay attentive rather than fall asleep, and be sustainable for a longer period. This will vary from person to person. For classic seated meditation, an upright seat on a cushion can work well. But there is nothing wrong with sitting in a chair with back support if you have back problems, or sitting upright without using the backrest if your knees give you trouble. There is no need to be dogmatic here either; try out what works best for you. Sitting upright without support may also become easier with practice. Additional stretching and strengthening exercises can of course help with this as well. Be mindful with yourself here too; your body will let you know what it needs.
One aspect of yoga is also to make it easier to remain in a meditative posture for longer.