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.