The story of mankind begins with a test. There were many trees in the Garden of Eden. There were two trees in the middle of the Garden: The Tree of Life, and The Tree of the Knowledge of Good and Evil.
Adam and Eve were invited to eat from every tree in the Garden except the Tree of the Knowledge of Good and Evil. They were not to touch it or eat from it.
Notice that it was not the tree of good and evil, but the Tree of the Knowledge of Good and Evil. Eating from the tree did not result in evil, it resulted in the knowledge of good and evil.
It must have been a genuine tree, because the tree was good for food and pleasing to the eye. But this is difficult to understand. It could not be a tree like trees we have known. How could an individual eat an apple, or orange, or some such fruit, and gain knowledge?
Yet to say it is an allegory does not fit the text of the Bible.
Things were somewhat different in the Garden, in that the serpent spoke. So there must have been a tree with fruit that imparted knowledge when it was eaten. I can't see any way around it at this time.
Growth in Christ consists of growing in the ability to distinguish evil from good, and in the willingness to embrace what is good and reject what is evil. I have written previously that as the Tree of Life assuredly is Christ, perhaps the Tree of the Knowledge of Good and Evil also is Christ. Yet, I am not so sure. I notice that there is a Tree of Life in the heavenly Jerusalem, but not a Tree of the Knowledge of Good and Evil
We "eat" of Christ by being fed in the spirit realm by His body and blood. But how does one eat from the Tree of the Knowledge of Good and Evil?