In what version of the Bible??????
The written in stone by the finger of God Ten Commandments were given to Moses on Mt. Sinai, which was well after the creation account.
All versions. The Sabbath was a memorial to Creation. Genesis 2:3. So God placed Adam and Eve on this earth but gave them no instructions of diet, hygiene, worship duties and civil duties regarding theft, lying, murder or anything? Is that what you really really deep down believe? If there is no law, there is no sin. Did God owe Cain an apology for not making it clear that murdering Abel was a no-no? This defies reason and our God is a reasonable God and foresees the future before it happens. Of course there laws. Cain did not plead ignorance on this.