The Prophet (peace be upon him) said:
" After the death of a person, his actions stop, except three things that he leaves behind: First, continuous charity, Second, a knowledge from which some benefit may be obtained, Third, a virtuous son who make dua (pray, supplicate) on his behalf." Related by Muslim.
1. Remember that death will come to everyone.
2. This hadith advises us on investments we need to make while we are still alive that will hopefully benefit us after we die.
a) continuous charity (e.g. building/contributing to a masjd/orphanage that still serves as a place of worship or place of refuge/comfort for orphans)
b) knowledge: this advice highlights the importance of passing on beneficial knowledge to people; who knows, the possibilities for teaching are infinite (i.e. guiding one person who then guides someone else and so on and so forth). this is similar to a franchise model, and it nice to know that our Lord's mercy/rewards has no limit
c) when we are blessed with children, it is important to raise them properly, and asking them to keep us in in our prayers, God willing.
May Allah give us the ability to give continuous charity, teach others of beneficial matters, and grant us righteous children who always make dua (supplication) for us. Ameen!
Much love and peace-