Genesis 2:16-17: “And the Lord God commanded man, saying, “Of every tree of the garden you may freely eat; but of the tree of the knowledge of good and evil you shall not eat, for in the day that you eat of it you shall surely die.”
The curse of man happened after the eating of the fruit from the tree in the garden. It wasn’t so much the fruit that resulted in the curse, but Adam and Eve’s act of disobedience to God’s one command. But, how did the first two humans even know what sin was?
At this point in history, there was no evil affecting the world. The creation was still “very good.” Sin had not yet entered the world. God gave commands on what Adam and Eve could do and specifically told them not to eat from the one tree in the garden. By knowing that it would be wrong to eat from the tree, Adam and Eve had the knowledge of what was wrong. They knew it would be wrong to disobey God by breaking this one rule. They chose to break the rule, and sin entered the world afterward.
It’s similar to telling a child not to touch a hot stove. Inevitably, the child is going to touch it and get burned. Through the child’s disobedience, he suffered the consequence (injury). Likewise, God forbade the eating of the one tree in the garden because of its consequence (physical death, curse on humans, animals, and the earth). Adam and Eve knew it was wrong, but they still did it.
It should also be added that Adam and Eve were created in God’s image, which means they understood right from wrong because God’s standards for right and wrong are part of His character. Laws in this world are in place regardless of them being spoken or written down. For example, gravity will take effect regardless of your knowledge of gravity. If you visit a city and don’t know the speed limit, and then get caught speeding, you are still guilty of breaking the law even though you didn’t know the speed limit.