What we see here is that (1) Eve knew exactly what God had said, (2) yet she MODIFIED God's words because she was hankering after the forbidden fruit. How did she modify the words of God.
Well, somebody changed this, that's for certain!
There are a few possibilities.
Perhaps Eve concocted this on her own.
Perhaps Adam told her this for his own reason, maybe, because he thought she needed extra protection.
Perhaps God had told them additional instruction not included in the text, only seen in Eve's comment.
Something else.
The problem with too many Christian today is that they refuse to believe anything that is implied. They demand explicit statements, which gives them an out. If there is no explicit statement, it means that the truth does not exist. Well God will not accept such reasoning.
I see another problem also. There sometimes seems to me to be too easy of a willingness to insert our own ideas and accept them as Gospel Scripture.
No one here knows exactly, with certainy, why Eve said what she did. At least not that I can tell.
Much love!