Warning of the Flood & Preparation for the Flood Gn 6: 5-22
The main Idea in Gn 6: 5-22 is God telling Noah to build the ark and how to go about doing it. The first thing that happens is God realized how sinful the earth really was and God was going to wipe out all humans from this earth. Next God told Noah how to build the ark. That it had to be this tall and this long. Finally, God told Noah to bring two of each and every animal on the boat 1 male and 1 female and God all so told him to only bring his wife, his sons, and his son's wives.
"When the Lord saw how the wickedness of human beings was on earth, and how every desire that their heart conceived was always nothing but evil, the Lord regretted making human beings on earth, and his heart grieved" (Gn 6:5-6).
"God said to Noah: I see that the end of all mortals has come, for the earth is full of lawlessness because of them. So I am going to destroy them with the earth" ( Gn 6:13).
"Noah complied; he did just as God had commanded him" (Gn 6:22).
The life lesson we can learn from this passage is that we as people sinning came back and God wanted to punish us to show us that all bad things we do will have a bad effect on ourselves.