Yes, if you are unable to pray standing because of illness, pain, dizziness, or a real risk of harm, you may pray sitting.
The general order is: pray standing if you can; if you cannot, pray sitting; and if you cannot sit, pray lying on your side, according to your ability. This is based on the Prophet’s instruction to ‘Imran ibn Husayn (Sahih Bukhari, Hadith 1117).
For an obligatory prayer, standing is generally fard (obligatory) for someone who is able. If you can stand for part of the prayer but not all of it, stand as much as you safely can, then sit for the remainder. You should perform bowing and prostration if able; otherwise, make gestures, with the gesture for prostration lower than the gesture for bowing.