Abu Hurairah (May Allah be pleased with him) reported:
The Messenger of Allah (ﷺ) said, "When a man dies, his deeds come to an end except for three things: Sadaqah Jariyah (ceaseless charity); a knowledge which is beneficial, or a virtuous descendant who prays for him (for the deceased)."[Muslim].
App reference: Book 13, Hadith 8
Arabic/English book reference: Book 13, Hadith 1383