Actually, the Word has an excellent definition of sin: the Apostle James said “to him who knoweth to do good, and doeth it not, to him it is sin.” Can’t get any plainer than that.
Sin is described in the Bible as transgression of the law of God (1 John 3:4) and rebellion against God. And as we read in those opening chapters of the OT book of Genesis, sin originated as a manifestation of disobedience to God. Can’t make it any clear then that.
I thought that’s what I said. Knowing what we are supposed to be doing (following what we know of God’s law, which is always good), and then doing something contrary to God’s law (which is refusing or rebelling against something we understand to be good), is the definition of sin. John and James were saying the same thing. However, the obvious corollary is: those who do not know how to do good (little children, the severely mentally handicapped) are incapable of sin. If there is no understanding of what “good” is, then there can not be the imputation of sin in any action by those so limited. Error, poor judgment, mistakes, yes. But not sin.