Abu Hurairah (May allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "Look at those who are inferior to you and do not look at those who are superior to you, for this will keep you from belittling Allah's Favour to you."[Al-Bukhari and Muslim].This is the wording in Sahih Muslim. The narration in Al-Bukhari is: Messenger of Allah (ﷺ) said: "When one of you looks at someone who is superior to him in property and appearance, he should look at someone who is inferior to him".
Arabic/English book reference: Book 1, Hadith 467