Forgetting to Perform an Obligatory Action of the Prayer
Maintaining proper order between the obligatory actions of the prayer (e.g. standing, bowing, prostrating) is also obligatory. The validity of the prostration, for example, is dependent on its following the bowing. If one prostrated without bowing first, then the prostration would be considered inconsequential and it would need to be repeated. One would return to the standing position, perform the bowing that one forgot, stand up again, and then return to the prostration.
If one misses the bowing or both prostrations completely and moves forward with the prayer, they must repeat this rak`ah because it is not considered to be a proper rak`ah. If one misses one of the two prostrations of a rak`ah, one only needs to make up the missed prostration. This should be done when one remembers it, even if it is in a following rak`ah.
In summary, missing an obligatory action does not immediately invalidate the prayer because it can be corrected by repeating the actions properly, or in the case of the second prostration, by performing it later. One would also need to make the forgetfulness prostrations at the end if the mistake was done forgetfully.
There are more details depending on the specific scenario, but these are some basic points.
[Ibn Abidin, Radd al-Muhtar; Al-Shurunbulali, Maraqi al-Falah; Al-Kasani, Bada’i` al-Sana’i`]
And Allah knows best.
Answered By: Shaykh faraz Rabbani