Exodus14and Deuteronomy.15Beginning with the Old Testament, the sacred books refer to the "ten
The gift of the commandments and of the Law is part of the covenant God sealed with his own. In Exodus, the revelation of the "ten words" is granted between the proposal of the covenant and its conclusion - after the people had committed themselves to "do" all that the Lord had said, and to "obey" it. The Decalogue is never handed on without first recalling the covenant (“The LORD our God made a covenant with us in Horeb.").
Source: Catechism of the Catholic Church (Vatican.va)