Was the command not to eat of the fruit a warning, or just an arbitrary command? In other words, was the command just given because God made a decision to make that a rule because He’s God (which made breaking the command a sin), or was there anything about the fruit (if we take it literally) that did something to those who ate it?
Later on we hear about a tree that would make them live forever, so I’m assuming that the name “knowledge of good and evil” would mean something.
The sin was disobedience of God. The command could be rendered, “Thou Shall Obey The Lord Your God”, and it could be said that this was further refined and defined later with, “Hear, O Israel: The Lord our God, the Lord is one. Love the Lord your God with all your heart and with all your soul and with all your strength” (Deut 6:4, Matt 12:29), because love is the authentic means to obedience, and this love for God was yet insufficient in Adam, as it is in
us, his descendants, until we also begin to love Him, by His grace.
Jesus said it all in John 15:5, “Apart from Me you can do nothing”. Man is lost, dead without God, and Adam’s disobedience was the very act of “freeing” himself from his divine Partner. Prior to that, Adam & Eve had no direct experience of evil; and wouldn’t be able to identify
good as a separate reality either since everything in creation was good, with no evil to contrast it with.
The Hebrew word used for “knowledge” in the name of the tree is most often rendered “experience”, as to know something by direct experience, such as knowing a person carnally or knowing baseball by playing it rather than reading about it or watching it on TV: knowing by doing, IOW.
Like Prodigals, we’re here to learn a lesson: of the goodness, trustworthiness, and love of the Father, Whom Jesus came to reveal, and of our absolute need for Him. The evil that humankind would come to know by the act of separating itself from God would play its part in this “education”, as the Prodigal came to his senses in the pigsty.