There are a number of passages in the Bible that talk about covenants. The very first one we read about is the covenant God made with Noah after the flood (Gen. 9)
This was the first time that God mentioned a covenant to a man. It was about not destroying humankind again with a flood as He had done. He gave the rainbow as a token of this covenant. (Gen. 9:9-13)
This covenant with Noah was the first revelation of the convenant that God had already made within the Godhead (Father, Son and Holy Spirit) before the foundation of the world.
God refers to it as the Everlasting Covenant. God, the Father, made a covenant with Christ, the Son, that He would create a people for His glory. He wanted to create a creature who would worship Him and love Him, and delight in His presence.
God wanted to create a creature in His image, with his qualities of holiness and righteousness. In order to make this creature pure as gold, God also created Satan and evil.
God knew that this creature, this human being, was going to fall into the trap of the devil, and was going to sin against Him. That was the part that the Son had to play in His Father’s wondrous epic: He had to become a man, and give His own life in order to redeem this creature. That was the covenant.
Christ, the Son, came to do His Father’s will. He came to shed His blood in propitiation for the sins of His people. He washed His people in His own blood, to justify them before God, to deliver them from the bondage of sin and death, and to make them as pure as gold.
Only the believers in the Lord Jesus Christ can have this knowledge and understanding, and they will be able to discern the work of God, the Almighty.