Now that everyone and everything is dead, God wants Noah and his boys (oh, and wives, but whatever) to fill the earth again. He promises to be nicer next time, but still has some rules. These are mostly about blood.
Oh, but look, a rainbow! God says that this minor trick of light refracting off water droplets is REALLY his promise to NOT KILL EVERYONE AGAIN! What a guy! The implication is that water refraction didn’t work before that moment. Either that or he simply co-opted a common natural phenomenon.
Now, in the next bit of the narrative we get an intriguing story of a drunken Noah and a sadistic bit of punishment. Apparently, the great and holiest of men that God could find gets so drunk he passes out naked. His son, Ham sees him as such (no other narrative about this, mind you). When Noah finds out, he freaks out. No explination as to WHY Noah finds this bad, but he curses Ham’s son, Canaan, to be a slave.
Yes folks, he decides that because Ham was “wrong” that Ham’s son, his own grandson and all his descendants since up to now that is how curses work, should be punished. The children pay for the sins of the father.
Noah declares Canaan a slave of Shem and Jepheth and has God extend Jepheth’s lands, presumibly to take over Canaan’s.
And Noah lived to be 950.