Abu Burda reported,

I entered upon Abu Musa while he was in the house of the daughter of Fadl bin Abbas. I sneezed, but he did not invoke a blessing for me. Then she sneezed, and he invoked a blessing for her.I went back to my mother and told her about it. When he came to her, she said, "My son sneezed in your presence and you did not invoke a blessing for him, but she sneezed and you invoked a blessing for her."He replied, "Your son sneezed but did not praise Allah, so I did not invoke a blessing for him. She sneezed and praised Allah, so I invoked a blessing for her. I heard the Messenger of Allah ﷺ say, 'When one of you sneezes and praises Allah, invoke a blessing for him. But if he does not praise Allah, do not invoke a blessing for him.'"

Muslim 7488

Sahih

حدثني زهير بن حرب ومحمد بن عبد الله بن نمير واللفظ لزهير قالا حدثنا القاسم بن مالك عن عاصم بن كليب

عن أبي بردة قال

دخلت على أبي موسى وهو في بيت بنت الفضل بن عباس فعطست فلم يشمتني وعطست فشمتها فرجعت إلى أمي فأخبرتها فلما جاءها قالت عطس عندك ابني فلم تشمته وعطست فشمتها فقال إن ابنك عطس فلم يحمد الله فلم أشمته وعطست فحمدت الله فشمتها سمعت رسول الله ﷺ يقول إذا عطس أحدكم فحمد الله فشمتوه فإن لم يحمد الله فلا تشمتوه

مسلم 7488صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Asceticism and heart-softening matters
Chapter
Saying "yarhamuk Allah" to one who sneezes and the dislike of yawning
Numbering
Darussalam 7488
Muslim 7488