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.
“Now as He was going out on the road, one came running, knelt before Him, and asked Him, ‘Good Teacher, what shall I do that I may inherit eternal life?’ So Jesus said to him, ‘Why do you call Me good? No one is good but One, that is, God.’” Mark 10:17-18.
“But the angel said to me, ‘Why did you marvel? I will tell you the mystery of the woman and of the beast that carries her, which has the seven heads and the ten horns. The beast that you saw was, and is not, and will ascend out of the bottomless pit and go to perdition. And those who dwell on the earth will marvel, whose names are not written in the Book of Life from the foundation of the world, when they see the beast that was, and is not, and yet is.’” Revelation 17:7-8.
“Then one of the seven angels who had the seven bowls came and talked with me, saying to me, ‘Come, I will show you the judgment of the great harlot who sits on many waters, with whom the kings of the earth committed fornication, and the inhabitants of the earth were made drunk with the wine of her fornication.’” Revelation 17:1-2.
“Thus Noah did; according to all that God commanded him, so he did. Then the Lord said to Noah, ‘Come into the ark, you and all your household, because I have seen that you are righteous before Me in this generation. You shall take with you seven each of every clean animal, a male and his female; two each of animals that are unclean, a male and his female; also seven each of birds of the air, male and female, to keep the species alive on the face of all the earth. For after seven more days I will cause it to rain on the earth forty days and forty nights, and I will destroy from the face of the earth all living things that I have made.’ And Noah did according to all that the Lord commanded him.” Genesis 6:22-7:5.