What does Romans 10:5 mean?
Paul has just written that Jesus Christ, by becoming the "end of the law"—keeping the law perfectly and fulfilling it— provides righteousness to everyone who believes in Him. This is the only way to become righteous in God's eyes.Now Paul refers to a teaching from Moses, found in Leviticus 18:1–5. This describes a path to righteousness for those who keep the law, who live by the commandments of the law. In the context of the old covenant, this was a means for Israel to honor their relationship with God, and to obtain His earthly blessings (Deuteronomy 30:15–18).
However, this teaching was also meant to demonstrate that when it came to sin, salvation, and God's eternal standards, nobody can possibly maintain this obedience (Galatians 3:24). Not perfectly, and not nearly well enough to earn eternal salvation (Romans 3:10). That's why nobody can be made righteous by keeping the law. Everybody breaks the law. Everybody sins (Romans 3:23).
James put it very simply, "For whoever keeps the whole law but fails in one point has become guilty of all of it" (James 2:10). Those who seek to be justified before God based on their actions are doomed to failure (Romans 3:20). This is why God promised, even before Christ, to establish a new covenant to resolve those flaws (Jeremiah 31:31–34).