Galatians 3:17-18, “And this I say, that the covenant, that was confirmed before of God in Christ, the law, which was four hundread and thirty years after, cannot disannul, that it should make the promise of none effect. For if the inheritance be of the law, it is no more of promise; but God gave it to Abraham by promise”
First, God made the promise to Abraham that he would be the father of a countless number of people, and that Abraham and all his seed could cling to the promise that the just shall live by faith.
430 years later, God gave Moses the Law on Mount Sinai. The Law was not given to replace the promises. The Law was not given as a way for man to work his way to heaven. It was given as a schoolmaster, to lead us to Christ. It was given to show us the importance of the holiness of God, and of our need to model ourselves in His ways. It was given to protect the people and help them guard against the evil influences of the idol worshippers that surrounded them.
The Law does not make the promise null and void.
The Law does not replace the promise.
The Law served as a guide for the people of Israel until Messiah would come to take away the burden of their sin, and the sin of all mankind.
Because of Christ, we are no longer bound to live under the law.