Abdullah bin Masud reported,

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

Bukhari 73

Sahih

حدثنا الحميدي قال حدثنا سفيان قال حدثني إسماعيل بن أبي خالد على غير ما حدثناه الزهري قال سمعت قيس بن أبي حازم قال سمعت

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

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

البخاري 73صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Knowledge
Chapter
Feeling of contentment in knowledge and wisdom
Numbering
Darussalam 73
Bukhari 73