Abu Qatada reported,

The Messenger of Allah ﷺ said, "The best things a man can leave behind after his death are three. A righteous child who prays for him, an ongoing charity whose reward reaches him, and knowledge that is acted upon after him."

Azami 1194

Sahih

عن أبي قتادة قال

قال رسول الله ﷺ: خير ما يخلف الرجل من بعده ثلاث: ولد صالح يدعو له، وصدقة تجري يبلغه أجرها، وعلم يعمل به من بعده.

الأعظمي 1194صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Knowledge
Chapter
Encouragement to seek knowledge
Section
Beneficial knowledge having unending reward
Numbering
Jami al-Kamil 1194 (2nd edition)
Azami 1194