The Old Testament was until Jesus died on the cross.
When we read the Old Testament, we see that righteousness was by obeying the Law (Deut 6:25)
But God gave them the land not because they obeyed the law but by grace (Deut 9:5)
Israel was exiled from the land because they broke the law (Deut 28:15-37)
Jesus came and told Israel that they needed righteousness of the Law to enter heaven (Matt 5, Matt 19) before the Cross.
But then He told them this is impossible for mankind (Matt 19)
After the Cross, the Law was abolished (Ephesians 2, Colossians 2)
Paul tells us that Abraham was righteous by faith without any works before the law came (Romans 4, Galatians 3)
This Righteousness of faith was a mystery hidden by the Law until Jesus came and died on the Cross.
The Law was a temporary covenant that was from Moses until the Cross to show the world that nobody can save themselves by good deeds (Galatians 3, Romans 3).
Nobody can be righteous by the law.
We are only righteous by faith in Jesus thanks to His death and resurrection.
Grace came on the Cross and Resurrection of Jesus.
This grace means that the nations can be saved by Faith in Jesus and not by works. (Ephesians 2:8)
Christ is the end of the law so that Righteousness is given to all who believe (Romans 10:4-10)
Everyone who believes in Jesus without their works, is made Righteous and forgiven all sins freely by grace
(Acts 10:43, 13:35-38)