And Paul spells out, in that passage, that righteousness comes by faith, not obedience to the Law.
While Paul denied in Romans 4:4-5 that we can earn our righteousness by our obedience as a wage, he also said in Romans 2:13 that only doers of the law will be declared righteous, so there is a reason why our righteousness requires us to choose to be doers of the law other than in order to earn it as a wage, such as faith insofar as Romans 3:31 says that our faith uphold God's law. Furthermore, there are many other verses that connect our faith in God with our obedience to God's law, and connects our unbelief with our disobedience:
God's law was given for our own good (Deuteronomy 6:24, 10:12-13) and obedience to any set of instructions that are for our own good is about putting our faith in the one who gave them to rightly guide us, which is why Jesus said in Matthew 23:23 that faith is one of the weightier matters of the law. What we believe is expressed through our actions, which is why James 2:17-18 says that faith without works is dead and that he would show his faith by his works, so doing good works is what faith looks like. In Hebrews 11, every example of faith is an example of someone doing works. In John 3:36, believing in Christ is equated with obeying him. In Revelation 14:12, those who kept God's commandments are the same as those who kept faith in Jesus. In John 6:40, those who believe in Jesus will have eternal life, in John 17:3, eternal life is knowing God and Jesus, and in Matthew 19:17, the way to enter eternal life is by obeying the commandments, so obedience to the commandments is what it looks like to believe in Jesus and to know him. In Habakkuk 2:4, the righteous shall live by faith, and in Isaiah 51:7, the righteous are those on whose heart is God's law, so living by faith does not refer to a manner of living that is not in obedience to God's law. In Romans 1:5, we have received grace in order to bring about the obedience of faith, and in Romans 16:25-26, Paul's Gospel and the preaching of Christ was to bring about the obedience of faith. In Deuteronomy 28:1, it speaks about faithfully obeying the voice of the Lord. In Romans 3:31, our faith upholds God's law. God is trustworthy, therefore His law is also trustworthy (2 Samuel 7:28, Nehemiah 9:13, Psalms 19:7, 18:30, 33:4, 111:7, 119:30, 42, 75, 86, 99, 138, 142, 151, 160) and a law that isn't trustworthy can't come from a God who is trustworthy, so to put our faith in the law is to put our faith in the Lawgiver to rightly guide us, while to deny that God's law is of faith is to deny the faithfulness of God.
In Deuteronomy 32:51, Moses broke faith with God because he did not obey what God commanded him to do. In Numbers 5:6, disobedience to God's law is referred to as breaking faith. In Joshua 7:1 and 1 Chronicles 2:7, Israel broke faith by not doing what God commanded. In 1 Chronicles 10:13, Saul broke faith because he did not keep the command of the Lord. In 2 Chronicles 33:19, sin is equated with faithlessness. In Jeremiah 3:6-14, Israel was faithless because they did not obey God. In Ezekiel 14:13, sin is equated with acting faithlessly. In Psalms 119:158, David said that he looked at the faithless with disgust because they did not keep God's commands. In Romans 1:29-32 and Revelation 21:8, being faithless is associated with actions that are in disobedience to God. In Hebrews 3:18-19, unbelief is equated with disobedience. In 2 Timothy 3:8, those who oppose Moses also oppose the truth, being corrupted of mind and disqualified in regard to the faith.