Believe in Allāh and His Messenger and spend out of that in which He has made you successive inheritors. For those who have believed among you and spent,1 there will be a great reward.[57:7].
"The Messenger of Allah said: 'The best things that a man can leave behind are three: A righteous son who will pray for him, ongoing charity whose reward will reach him, and knowledge which is acted upon after his death.'" (Hasan) Sunan Ibn Majah 241