Abdullah bin Masud reported,

The Prophet ﷺ said, "There is no envy except in two cases. A man whom Allah has given wealth and who spends it in the cause of truth, and a man whom Allah has given wisdom, who judges by it and teaches it to others."

Azami 1105

Sahih

عن عبد الله بن مسعود قال

قال النبي ﷺ: لا حسد إلا في اثنتين: رجل آتاه الله مالا فسلط على هلكته في الحق، ورجل آتاه الله الحكمة فهو يقضي بها ويعلمها.

الأعظمي 1105صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Knowledge
Chapter
Encouragement to seek knowledge
Section
Feeling of contentment in knowledge and wisdom
Numbering
Jami al-Kamil 1105 (2nd edition)
Azami 1105