The Messenger of Allah ﷺ said, "There is no envy except in two cases. A man whom Allah has taught the Quran, and he recites it throughout the night and throughout the day, so his neighbor hears him and says, 'I wish I had been given the like of what so-and-so has been given, that I might do as he does.' And a man whom Allah has given wealth, and he spends it in the cause of truth, so another man says, 'I wish I had been given the like of what so-and-so has been given, that I might do as he does.'"
أن رسول الله ﷺ قال: لا حسد إلا في اثنتين: رجل علمه الله القرآن فهو يتلوه آناء الليل وآناء النهار، فسمعه جار له، فقال: ليتني أوتيت مثل ما أوتى فلان فعملت مثل ما يعمل، ورجل آتاه الله مالا فهو يهلكه في الحق، فقال رجل: ليتني أوتيت مثل ما أوتى فلان فعملت مثل ما يعمل.
Bukhari narrated it in the Virtues of the Quran (5026), from Ali bin Ibrahim, who said, Rawh told us, Shubah told us, from Sulayman (he is Amash), I heard Zakwan, from Abu Hurairah, and he related it.