Abu Huraira reported that Allah's Messenger (ﷺ) said:
When one of you looks at one who stands at a higher level than you in regard to wealth and physical structure he should also see one who stands at a lower level than you in regard to these things (in which he stands) at a higher level (as compared to him). (FR)
Reference (FR): Sahih Muslim 2963 a (FR)
In-book reference (FR): Book 55, Hadith 12 (FR)
USC-MSA web (English) reference(deprecated numbering scheme): Book 42, Hadith 7068 (FR)