قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " إِذَا نَظَرَ أَحَدُكُمْ إِلَى مَنْ فُضِّلَ عَلَيْهِ فِي الْمَالِ وَالْخَلْقِ، فَلْيَنْظُرْ إِلَى مَنْ هُوَ أَسْفَلُ مِنْهُ مِمَّنْ فُضِّلَ عَلَيْهِ "
And the Messenger of Allah, peace and blessings be upon him, said: "When any of you sees a person who is superior to him in wealth and appearance, then he should also look at the one who is lower than him in these qualities, due to which he has been given superiority over that person."
Related hadith on this topic