There is no direct commandment that says we must leave an inheritance. Ecclesiastes discusses the futility of a man who works hard all of life and saves a lot of money but ends up dying with the money being spent by his heirs who foolishly spend it.(All is vanity and meaningless...there is nothing new under the sun)
It is not a bad thing to want to leave a little something for your surviving family but the survivors should have no expectations that they deserve to get what they did not earn themselves.
“the survivors should have no expectations that they deserve to get what they did not earn themselves”
Yep.