“The law of the Lord is perfect, converting the soul; the testimony of the Lord is sure, making wise the simple; the statutes of the Lord are right, rejoicing the heart; the commandment of the Lord is pure, enlightening the eyes; the fear of the Lord is clean, enduring forever; the judgments of the Lord are true and righteous altogether. More to be desired are they than gold, yea, than much fine gold; sweeter also than honey and the honeycomb. Moreover by them Your servant is warned, and in keeping them there is great reward.” Psalm 19:7-11.
Sometime after the creation of Adam and Eve on the sixth day of creation, see Genesis 1:26-31, they rebelled against God by eating the fruit of the tree of the knowledge of good and evil.
By doing so they brought sin into the world and upon all of humanity. The details of this are in Genesis 3:1-24.
“This I say, therefore, and testify in the Lord, that you should no longer walk as the rest of the Gentiles walk, in the futility of their mind, having their understanding darkened, being alienated from the life of God, because of the ignorance that is in them, because of the hardening of their heart; who, being past feeling, have given themselves over to licentiousness, to work all uncleanness with greediness.” Ephesians 4:17-19.