“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.”
In this verse, God is warning against eating from the tree of the knowledge of good and evil. God states the consequence for doing so would be death.
But God is not saying that He will bring about that consequence, or kill anyone. In fact, as I have argued elsewhere, God is never an agent of harm. The devil is an agent of harm (John 10:10); “The god of this age“ (2 Cor. 4:4) wields the power of death (Hebrews 2:14), not God.
This distinction was, and still is, lost to many believers. It is doubtful Moses, the editor of Genesis, himself distinguished that the gracious God was not threatening Adam about what He, God, would do in the event of Adam’s disobedience; rather, God was warning Adam about what the legalistic Satan would do through the open door provided to him by Adam’s disobedience: Satan would bring in death.
In Genesis 2:17, Moses got the wording right; wording that does not explicitly implicate God as the cause of death. Nevertheless, from Moses’ other misattributions of the satanic to God, we see he was virtually uninformed about Satan.