The Messenger of Allah ﷺ said, "When a person dies, all action is cut off for him with the exception of three things: sadaqah (charity) which continues, knowledge which benefits, or a righteous child who makes supplication for him" (Muslim).
As Muslims, we live in this life (dunya) to plan and prepare for the next life (akhirah). We do not live for this temporary world for we will eventually leave it. We live for the next world for it is eternal and never ends. This life is only a test to see if we pass and enter paradise by Allah's grace; or if we fail and enter hellfire by His justice (may Allah protect us).
We are not guaranteed life but we are guaranteed death as it will come to all of us one way or another. The real question is not what you amassed and took from the life of this world, but rather what you left behind. What is your spiritual legacy that continues after you are gone that will benefit the generations to come? What will continue to benefit and reward you in your grave and hereafter?
When you die, you will want people to say he left a continuous charity, beneficial knowledge, or a righteous child who supplicates for him. All other actions will be cut off and nothing else after death will really help you. We must live our lives planning and preparing for what really matters in the next life.