Christ’s answer to the young wealthy man was to keep the law and only when the man protested that he had done this did Christ tell him that “if you would be perfect, sell all you have...” Obviously the part-two answer is not a “commandment”.
That’s because he obviously loved his money too much.
It’s when it gets in the way of God, that it’s a problem.
And that is a problem far too many people have. It’s a rare person I think who can handle that kind of money, which is why I think not many people are as wealthy as they want to be, or name it and claim it to be. It appeals to much to the lust of the flesh, the lust of the eyes, and the pride of life.
If God thought they could handle the wealth, He’d have already given it to them. But you can’t love God and money.