The wickedness of humanity grew from Lamech’s time to the Flood, so that all their thoughts were evil only. God said his Spirit would no longer strive with mankind. This speaks to the restraint of the Spirit in our conscience, as the grace of God, keeping us from going too far into evil. Paul says in Romans that the judgement of God means God takes away this restraint, handing us over to our own thoughts, allowing us to go our own way. Then our own actions bring upon us their own consequences. God is not the one who punishes us directly, but after pleading for a long time he finally allows us to do what we insist and reap the result.
The “giants” in the world were people like Nimrod and Lamech, the ruthless warriors, dictators, who spoiled the earth for their own control. They took all the women they liked for wives, just like the rulers after the Flood did, such as Pharaoh and Solomon. Books like “Enoch” (written in the Second Temple era) spiritualised this Genesis six text, making a parable about good and evil (Enoch stated his text was a parable and not literal.) Enoch is an allegory of the powers of evil we release when we serve ourselves. Their offspring became evil like their fathers, even worse. Angels do not have seed. “Sons of God” in this context is a term for human rulers.
In the text we see the usual “divine counsel” genre for this kind of literature, like in Job. He looks and he makes a judgment, sometimes in the plural “Elohim,” for the magisterial attributes, as in Genesis 1 and 11, which also could reflect the pagan story-telling genre, where the gods are plural. The scriptures often take up the pagan speech of the day and then transforms it into new redeemed meanings: God in one person sums up all the gods of the pagans in his incontestable power. But this counsel isn’t directly carried out by God, but through the agency of humanity and our own freewill chosen behaviour.
The Flood was a consequence of the destruction these empires brought to nature. I don’t know anything about natural eco-balances before the Flood, however many experts do comment on this. It is wrong to assess these eco-balances before the Flood by those we see in the natural world today. The world was a lot more fertile, plant food a lot more nutritious. Scholars like John Walton speak of pagan cosmology myths, which claimed the earth was flat, and pillars held up the sky, separating the waters above. Scriptures use similar language, but it is poetic, e.g. the pillars representing God’s power and wisdom. There are many issues that come together in interpreting the text and care needs to be taken by those on all sides. Other scholars localise the Genesis text, claiming Adam, like Abraham, was selected out of a pre-existing humanity. They also localised the Flood, as an embellished Sumerian story. But the table of nations (across the whole globe) came from Noah and his sons after the Flood. The text may be poetic in parts, but it is not embellished. It was the human destruction of the then ecosystem that brought about the Flood as a consequence. This Flood is the most plausible cause of the geological and fossil record we see today across the globe.
See the obedience of Noah, building a massive ship inland waiting for the Flood. Talk about “going against the cultural tide and sticking your neck out.” Noah would have looked the fool. This is usual for believers today, following the rational of the Prince of Peace in a world of corruption. It just doesn’t make sense to the world around us. “All who live godly in Christ Jesus shall suffer persecution.” But God keeps his promises.