A lot of sin occurred on earth for the first time and God could not tolerate it anymore, so he decided to wipe most of them out. However, there was still a part of him that loved humanity despite himself, so he allowed Noah to build an ark to save his family and two of each animal, so that the animals and humans could replenish. The flood was brought about wiping out most of humanity and it lasted for forty days and forty nights. The flood then subsided, which allowed Noah’s family to roam the earth again and form a covenant with God that God would never cover the entire earth with water at least ever again. Noah got himself wasted off of vineyard wine and two of his sons covered up his nakedness while the other just decided to gawk I guess, which led to Noah blessing two of his sons while cursing the youngest one.