Two men sneezed before the Prophet. The Prophet ﷺ said to one of them, "May Allah bestow His Mercy on you," but he did not say that to the other. On being asked (why), the Prophet ﷺ said, "That one praised Allah (at the time of sneezing), while the other did not praise Allah."
عَطَسَ رَجُلاَنِ عِنْدَ النَّبِيِّ ﷺ فَشَمَّتَ أَحَدَهُمَا وَلَمْ يُشَمِّتِ الآخَرَ فَقِيلَ لَهُ فَقَالَ هَذَا حَمِدَ اللَّهَ وَهَذَا لَمْ يَحْمَدِ اللَّهَ