“Therefore the children of Israel shall keep the Sabbath, to observe the Sabbath throughout their generations as a perpetual covenant. It is a sign between Me and the children of Israel forever; for in six days the LORD made the heavens and the earth, and on the seventh day He rested and was refreshed.”
This is one of the many passages that connect God’s example of resting on the seventh day with the command for people to observe the Sabbath. God set the Sabbath as a sign and perpetual covenant with His people.
Verses 13 and 14 give more background. God said, “Surely My Sabbaths you shall keep, for it is a sign between Me and you throughout your generations, that you may know that I am the LORD who sanctifies you. You shall keep the Sabbath, therefore, for it is holy to you. Everyone who profanes it shall surely be put to death; for whoever does any work on it, that person shall be cut off from among his people.”
God calls them “My Sabbaths.” And other passages show that God expects those who aren’t Israelites (gentiles) to also remember His Sabbaths (Isaiah 56:1-6). The New Testament explains that Jesus Christ is the Lord of the Sabbath and that there remains a Sabbath rest for the people of God (Mark 2:27-28 and Hebrews 4:9).
For more about the Sabbath, see “Is the Sabbath a Sign of God’s People?”