Ex 20:11 makes the case that the first text showing that humans were obligated to keep God's Sabbath - was Gen 2:1-3.
Gen 2:1-3
And so the heavens and the earth were completed, and all their heavenly lights. 2 By the seventh day God completed His work which He had done, and He rested on the...