Mankind was perfect and innocent. In fact, God preferred that they not know about evil and sin.
He gave them only one rule. Do not eat of the tree of knowledge of good and evil because your eyes will be open to the reality of sin.
The evil angel, Satan, who rebelled against God and had been cast to earth, came to them and spoke lies. He tempted them to doubt God’s command.
They gave into temptation and ate the forbidden fruit. They were deceived. Their act of rebellion separated them from God. Man and woman then knew about evil because they did not obey God.