Here’s an example of the righteousness by faith being preached in the Old Testament. In Ezekiel he says,
“Though I say to the righteous that he shall surely live, yet if he trusts in his righteousness and does injustice, none of his righteous deeds shall be remembered, but in his injustice that he has done he shall die.” Ez 33:13.
Paul was talking about people who trusted not in their own merit, but by faith looked forward to Christ. In contast, Romans 11 speaks of the Jews who did not arrive at God’s righteousness because they sought it by their own works and goodness. They were not saved because they did not trust in the righteousness of God which comes by faith in the atoning work of Christ.
Paul says by works of the law shall no man be justified, Rom 3:20. In Romans 8 he says “for what the law could not do weak as it was through the flesh, Christ did”, which is Paul pointing to again that the law could not justify, and had fault (Heb 8:6,7,13; 9:15-17), because of the weakness of man to avoid sin and be perfect. Ezekiel was teaching what the New Testament teaches, and by the way it’s what all people of faith have known (see Hebrews 11), that even the most righteous of righteous men can’t turn to trusting in their own goodness but must rely only in God’s grace for salvation.