The core of Biblical ethics is not found in the New Testament at all, but the story of Jesus and the rich young ruler does bring up some very foundational aspects of the Biblical philosophy of wealth, both in what it says and what it does not say. In Matthew 19:16-30, a wealthy man, called the "rich young ruler" by some, comes to Jesus to pursue eternal life, insisting he has kept all of the commandments Jesus lists to him; Jesus does not deny that the man has upheld these obligations. Instead, he tells the young man to sell his possessions and give to the poor, for then he will have secured treasure in heaven. This man, the text says, left Jesus saddened by his words, as "he had great wealth" and clearly did not care enough about anything beyond his riches to obey the person he sought out as a representative of God (it is noteworthy that this is also the passage where Jesus actually distances himself from God, questioning why the rich visitor would ask if Jesus is good when only God is good). Despite conversing with Jesus about ethics and soteriology, he was too emotionalistically/psychologically attached to his riches to give them up when asked.
This is the context in which Jesus makes the renowned statement that it is easier for a camel to enter the eye of a needle than it is for a rich person to enter the kingdom of God. He is not saying that no one who is wealthy can receive redemption, for when immediately asked how anyone can be saved, Jesus says that it is only through God that salvation is possible. Thing that would be impossible apart from God can still be achieved with his permittance--though not even God could do logically impossible things, such as make something exist and not exist at the same time. The Bible never condemns having riches, after all, given that one did not obtain them through sinful means, but it does repeatedly describe the folly of thinking that wealth will save someone from any sort of moral, existential, or spiritual deterioration, up to and including eventual death of the soul in the lake of fire.
Owning wealth is not ever condemned as sinful, by Mosaic Law, by Jesus, or anything else in the Bible representing God. Deuteronomy 4:2 and the absence of such a condemnation mean that having wealth is objectively nonsinful on the Christian worldview. A person could amass it through deception, theft (which includes depriving workers of livable compensation for the sake of owner/investor profits), murder, or some other sin, yet having or even seeking wealth is never the morally problematic thing. Mosaic Law, not the words of Jesus, is where the Bible details the very foundations of its moral framework, and if Jesus were to contradict this, especially while claiming to stand on the validity of what is now called the Old Testament, then the New Testament would philosophically contradict the Old Testament and would be false regardless of whether the latter is true. However, Jesus does not say that the rich young ruler should give away his possessions because it is wrong to have possessions--which would lead to its own contradictory ideas--but he presents this as a personal test to this individual.
It is obvious how it could not possibly be morally obligatory for people to give up their wealth to the poor, for then the poor who receive that wealth would have to give it away, and they would have to give it away immediately in order to be righteous if possessions and wealth are evil. There is also the fact that the men and women parting with their belongings would themselves become poor, at which point someone else would then be obligated to give their own possessions to the people who initially gave theirs away. Everyone would be or be trying to become poor, because everyone with wealth would be giving it away, including those who are on the receiving end of that very wealth! This would of course lead to the opposite of the more benevolent intentions behind wealth redistribution, and yet it would only amplify poverty or make it a status that endlessly shifts from person to person. The stance some liberals think the story of the rich young ruler supports is not what they might want it to be.
Either wealth is sinful and no one should have it, or it is not wealth that is the problem, but prioritizing wealth over reason, truth, justice, God, and even oneself and fellow humans. Jesus never tells the rich young ruler that he and everyone else must give up their wealth for the sake of morality. He tells this specific person that he needs to part with his riches in order to fully pursue devotion to God. Had he meant anything else, Jesus would have deviated from Old Testament philosophy, contradicted his own professed beliefs that are based on the Torah's philosophy, and been prescribing a goal that is hypocritical and unattainable if everyone is not obligated to abandon their wealth altogether at the same time. This, of course, would entail no wealth redistribution, just wealth abandonment. Abandonment of all money and possessions is not what Jesus demands of the rich young ruler. It is not what the Bible demands of anyone, even as it sharply opposes egoism and greed, as well as the economic exploitation of workers.