Jami` at-Tirmidhi #1376
The Chapters On Judgements From The Messenger of Allah 15:57
Abu Hurairah, may Allah be pleased with him, narrated that the Messenger of Allah (ﷺ) said:
"When a person dies, his deeds are cut off except for three: Continuing charity, knowledge that others benefited from, and a righteous son who supplicates for him."