Question: Sandy asked. “Can you help us out with a problem? How did Eve know she couldn’t eat from the tree of the knowledge of good and evil?”
Answer: I understand why you are asking this question - Eve wasn’t created when God told Adam not to eat from the tree.
Moses, who is credited with writing Genesis, expects us to use “context” when we read what he's written. Once we put context into play we get the answers we are looking for:
When families get together, they talk. We tell each other anything important we think our family members ought to know. So the answer to your question is - Adam told Eve about the restriction of eating the fruit. That’s why the serpent came to Eve and said, “Did God really say, ‘You must not eat from any tree in the garden’?” Casting doubt on Adam's and consequently, God's word.