The reason that YHWH destroyed the world with a flood was because He "saw that the wickedness of man was great in the earth, and that every intention of the thoughts of his heart was only evil continually" (Genesis 6:5[–8] ESV).
——
Concerning the creatures that were to be brought into the ark, YHWH instructed Noah to bring creatures that were CLEAN and NOT CLEAN. They included
1) 7 pairs (male + female mate) of each "kind" of CLEAN
a) beast animal (i.e. a lower animal as distinguished from human beings)
b) winged flying creature
… and
2) 1 pair (male + female mate) of each "kind" of NOT CLEAN
a) beast animal
b) winged flying creature
c) creeping creature
… so that they may live and keep their offspring alive on the face of all the earth (Genesis 6:19–20; 7:2–3). They went on board the ark two pairs ("two and two") at a time along with Noah, his wife, their three sons, and each their own wife (Genesis 7:7–9, 12–16).
After the flood had ended and everyone departed from the ark, Noah built an altar to YHWH. Noah then took from every clean beast animal and from every clean flying winged creature (remember, 7 pairs of each kind were brought on board the ark), and he offered them as burnt offerings on the altar (Genesis 8:20).
——
So, with regards to "clean" creatures, how does YHWH define "clean"? According to James Swanson's Dictionary of Biblical Languages With Semantic Domains : Hebrew (Old Testament), the Hebrew word in question can refer to being
1) "ceremonially or ritually clean (Leviticus 11:36; 1 Samuel 20:26)";
2) "pure, i.e., pertaining to the feature of an object virtually not having foreign particles or impurities (Exodus 25:11), note: it is not clear if this metal is alloyed or not, though it clearly is free from all impurities";
3) "flawless, perfect, i.e., without defect of any kind and so free from moral impurity (Psalm 12:7; Habakkuk 1:13)"; or
4) "clean, i.e., pertaining to not having dirt on an object (Zechariah 3:5)."
——
Does that adequately answer your questions?