Peace be upon you.
Please explain how qunut became part of prayer and where it comes from. Since it is recommended, does performing it affect the validity of the prayer?
How Did Qunut Become Part of Prayer?
The essence and first answer at a glance (60-word summary)
Qunut is at the heart of prayer. It has been part of prayer since its original prescription and is observed in both obligatory and recommended prayers. According to some narrations, qunut is an established Sunnah in the dawn, noon, afternoon, sunset, and night prayers, and it does not invalidate the prayer.
Answer by Master Ali Saei (Abdullah Meshkat)
Teacher and researcher in the intellectual tradition of wisdom and the Ahl al-Bayt | Soroush Bamdadān Cultural CenterQunut is an integral part of prayer. It has been prescribed since the very beginning of prayer and is observed in both obligatory and supererogatory prayers. According to some reports, qunut is an established obligatory Sunnah practice in the Fajr, Dhuhr, Asr, Maghrib, and Isha prayers.
عن أبی جعفر ع أنه قال: القنوت فی کل رکعتین فی التطوع و الفریضه.
وسائل الشیعه، vol. 6, p. 261
عن الرضا ع فی کتابه إلى المأمون قال: و القنوت سنه واجبه فی الغداه و الظهر و العصر و المغرب و العشاء الآخره.
وسائل الشیعه، vol. 6, p. 262