Abu Hurairah reported,

The Prophet ﷺ said, "Yawning is from Satan, so when one of you yawns, let him suppress it as much as he can, for when one of you says 'Haa,' Satan laughs."In another narration, "Allah loves sneezing and dislikes yawning. So when someone sneezes and praises Allah, it is the duty of every Muslim who hears him to respond with a blessing." Then he mentioned it.

Azami 2599

Sahih

عن أبي هريرة

عن النبي ﷺ قال: التثاؤب من الشيطان، فإذا تثاءب أحدكم فليرده ما استطاع فإن أحدكم إذا قال: ها، ضحك الشيطان. وفي رواية: إن الله يحب العطاس، ويكره التثاؤب. فإذا عطس فحمد الله فحق على كل مسلم سمعه أن يشمته، ثم ذكره.

الأعظمي 2599صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
What is prohibited and disliked in prayer
Section
Disliking yawning during prayer
Numbering
Jami al-Kamil 2599 (2nd edition)
Azami 2599