Note here that the problem is "hurriedly" gaining this inheritance. A wise man will prepare his children and his children's children for the inheritance that they will most likely receive at his death. He does this by teaching them the value of work. This work ethic that is built into them gives them a proper perspective toward money. They see money earned and see that they do not waste all their hard work on silly and frivilous pursuits. When the inheritance comes - they learn to spend it and invest it in ways that will bring long-term blessing rather than just a short-term high.
The best way to prepare a person for an inheritance is to have them focused on God rather than on money. They see an inheritance is a blessing to pass on rather than to be wasted on their lusts and desires. They want to see the family wealth passed to many generations. This is called generational wealth - and it can bless multiple generations of one family. But even more important than this is passing on to children the truth that the things of this world are passing away. Therefore the wise man invests and sees real wealth in terms of becoming rich toward God. This means investing in the kingdom of God - investing in good works - and investing in buiilding up disciples of Jesus Christ who can bless multiple generations. Ultimately the wise man teaches his children that the greatest inheritance is that given to us by God. We are blessed with a heavenly inheritance in Christ Jesus our Lord. That inheritance will never pass away - and is reserved in heaven for us.
Wealth - especially sudden, hurriedly gained wealth will test us sorely. We will be tested in our values - in our view of what is truly valuable - and in our view toward eternally valuable things. The man whose master is money (mammon in Scripture) will cling to that master and hate any others who rival him. The man whose master is the Lord will be blessed not just in the short term as he receives an inheritance, he will be blessed in his own generation - in multiple generations afterward - and ultimately, he will be blessed in the presence of God forever. Now there is an inheritance worth living for in life!