The rich young ruler doesn't have a money problem but rather a heart problem. Jesus already knows the situation before it arises and He warns the ruler of the dangers of prosperity and holding our desires and comforts so closely to money. Ultimately the Lord wants our heart and to steward our entire lives for His will and glory, not for ourselves.