God promised to make a covenant with Noah. What covenant do you think God would make with Noah? Do you think God will fulfill His promised to Noah?
Because Noah believed God and His promises
Genesis 6:22 [22]So Noah did everything exactly as God had commanded him.
Noah had Faith in God and in whatever He says because God cannot lie. Because Noah believed God about the flood even though he had never seen a flood before, Noah built the ark according to God's plan without any modification because God's way is always perfect and will always work. Noah trusted completely in God's plan for their salvation and in what God promised to do for him and his family.
Noah knew that only God knows what could save man from His judgment. What God had planned for Noah's salvation will surely work because God is Truthful and All-KNOWING. There was no need for Noah to invent something or call upon other gods for their salvation because there is nothing that can stand against God's judgment. If man can figure out on his own a way to escape God's judgment, then that man has outwitted God. However, it is impossible to outwit the All-KNOWING God.
After a long time, Noah finished building the ark according to God's word. Then the Lord said to Noah:
Genesis 7:1-4 [1]When everything was ready, the lord said to Noah, “Go into the boat with all your family, for among all the people of the earth, I can see that you alone are righteous. [2]Take with you seven pairs—male and female—of each animal I have approved for eating and for sacrifice, and take one pair of each of the others. [3]Also take seven pairs of every kind of bird. There must be a male and a female in each pair to ensure that all life will survive on the earth after the flood. [4]Seven days from now I will make the rains pour down on the earth. And it will rain for forty days and forty nights, until I have wiped from the earth all the living things I have created.”