Read Ellen G. White, “The Law and the Covenants,” pp. 363-373, in Patriarchs and Prophets.
“But if the Abrahamic covenant contained the promise of redemption, why was another covenant formed at Sinai? In their bondage the people had to a great extent lost the knowledge of God and of the principles of the Abrahamic covenant. . . .
“God brought them to Sinai; He manifested His glory; He gave them His law, with the promise of great blessings on condition of obedience: ‘If ye will obey My voice indeed, and keep My covenant, then . . . ye shall be unto Me a kingdom of priests, and an holy nation.’ Exodus 19:5-6. The people did not realize the sinfulness of their own hearts, and that without Christ it was impossible for them to keep God’s law; and they readily entered into covenant with God. . . . Yet only a few weeks passed before they broke their covenant with God, and bowed down to worship a graven image. They could not hope for the favor of God through a covenant which they had broken; and now, seeing their sinfulness and their need of pardon, they were brought to feel their need of the Saviour revealed in the Abrahamic covenant and shadowed forth in the sacrificial offerings. Now by faith and love they were bound to God as their deliverer from the bondage of sin. Now they were prepared to appreciate the blessings of the new covenant.” — Ellen G. White, Patriarchs and Prophets, pp. 371, 372.
Summary: The stories of Hagar, Ishmael, and the children of Israel at Sinai illustrate the foolishness of trying to rely upon our own efforts to accomplish what God has promised. This method of self-righteousness is referred to as the old covenant. The new covenant is the everlasting covenant of grace first established with Adam and Eve after sin, renewed with Abraham, and ultimately fulfilled in Christ.