The Law of Moses could never bring righteousness and right doctrine cannot either, because right doctrine is nothing more than a euphemism for righteousness through obedience to the new “laws of Christianity”. By right doctrine I mean more than just believing the right things, because right doctrine always includes adherence to the demands of that doctrine. So the gospel of right doctrine is one of obedience to rules and requirements, and is basically no different from the old Law. Only the rules have changed, slightly.
Galatians 3 has much to say about law keeping as a path to righteousness versus God’s promises as that path. The author notes pointedly that the promise to Abraham to be a conduit for blessing occurred 400 plus years before Moses even received the Law on Sinai. By implication, the promise was superior to the Law. The author is clear that righteousness could not come and never was intended to come through the Law and by implication through any later set of rules, laws, and doctrinal requirements. Righteousness comes through the power of God’s promise alone or it does not come at all.
Throughout the history of Israel God remained faithful to His promise to them, even after their rejection of Christ.