The Messenger of Allah ﷺ said, "Allah loves sneezing and dislikes yawning. So when one of you yawns, let him suppress it as much as he can, and let him not say 'haah, haah,' for that is from Satan, who laughs at him."
حدثنا الحسن بن علي حدثنا يزيد بن هارون أخبرنا ابن أبي ذئب عن سعيد المقبري عن أبيه
قال رسول الله ﷺ إن الله يحب العطاس ويكره التثاؤب فإذا تثاءب أحدكم فليرده ما استطاع ولا يقل هاه هاه فإنما ذلكم من الشيطان يضحك منه
Bukhari narrated it in "The Book of Manners," chapter "If one yawns, he should place his hand over his mouth," hadith no. 6226, from the hadith of Muhammad bin Abdul-Rahman bin Abu Dhib, through this chain.