The son of Abu Said al-Khudri reported on the authority of his father that Allah's Messenger ﷺ said. When one of you yawns while engaged in prayer, he should try to restrain so far as it lies in his power, since it is the Satan that enter therein.
The Prophet Muhammad ﷺ taught us many lessons about how to live a life pleasing to Allah and this hadith serves as an example of how important it is for us to be mindful of our actions even during prayer. We must strive to remain focused on worshipping Allah and not let anything distract us from doing so. Additionally, this hadith reminds us that although we may not always be able control everything around or within ourselves while praying, Allah knows what lies within our hearts and will forgive any unintentional mistakes made out of forgetfulness or lack of concentration due to external factors such as fatigue or boredom.