God gave both the Mosaic and New Covenants to the nation of Israel as a part of His plan for this nation and the world at large. However, they were given for different purposes, one is conditional, while the other is unconditional, and they are of different durations. Both covenants do show the loving nature of God, and that He is the God who keeps His promises.
According to Galatians 3:23-24 the Mosaic Covenant (Law) was given as a means of instruction to lead people to Christ, “But before faith came, we were kept in custody under the law, being shut up to the faith which was later to be revealed. Therefore the Law has become our tutor to lead us to Christ, so that we may be justified by faith” (Gal 3:23-24). It was meant to show that the Israelites were sinners in need of a Savior (3:22). On the other hand, the New Covenant was given for the express purpose of giving its recipients intimate knowledge of God (Jer 31:33) and eternal life through the forgiveness of sins (31:34, Matt 26:28).
Both covenants were made with the nation of Israel expressly (Ex 20:22, Jer 31:31), but the Mosaic covenant was conditional, while the New Covenant is unconditional. The Law was written as a code of conduct for the nation of Israel, upon which God promised to bless and prosper the people as long as they obeyed. If however, they disobeyed the covenant they were promised a series of curses (Deut 28:15-68), thus making the Mosaic Covenant conditional. The New Covenant is an extension, or a further revelation, of the Abrahamic Covenant made in Genesis 12 and Genesis 15. There God promised that He would bless the nation that came from Abraham, and that Abraham would be a blessing to all the families of the earth (Gen 12:2-3). It is through the New Covenant, instituted by the death of Christ, that God promises to save the nation of Israel by forgiving their sins (Jer 31:33-34). There are no conditions put on this promise; God simply states that He will do it, thus making the New Covenant, like the Abrahamic Covenant, unconditional.
Another distinguishing factor between these two covenants of God is the nature of their durations. The Law was a conditional covenant given by God that was meant to expire, whereas the New Covenant is an unconditional covenant that is eternal. God gave the Law to the people with the understanding that if they obeyed they would be put in the Land and blessed (Deut 28:1-2); however, if they did not obey the Law they would be driven from the Land and cursed (28:15, 63-64), thus making the contract void (Ezek 44:7). Since, the Law was not followed by the Israelites the Mosaic Covenant was broken and they were driven from the Land, in accordance with God’s eternal plan for the world. The disobedience of Israel did not negate God’s Law, but rather it was fulfilled in Christ, and He became the end of the Law in righteousness for everyone who believes (Rom 10:4). However, He had promised the New Covenant to the people before the diaspora, in Jeremiah 31, and it was instituted by the death of Christ. The New Covenant does not contain any conditions for its recipients; God has promised to give the forgiveness of sins to the entire nation of Israel at a time in the future when they will look upon the one whom they pierced and believe, according to Zechariah 12:10-14. Since, this New Covenant is given by God unconditionally it is eternal in its nature. This promise of God can never be broken. These are two of the most important covenants given by God, however the New Covenant is far superior in its eternal nature and in the forgiveness of sins that is made available in this promise from God.