The early chapters of Genesis have many questions of this type. All the questions aren't answered. We don't know everything that the Biblical literature is teaching. Modern science has great gaps in its understanding as well. But there is abundant evidence of a catastrophe on the earth.
Geologists tell of a period in earth's history when something extraordinary took place.
There is evidence, for instance, that the land mass in Antarctica, now covered with ice, was once tropical. We also know that cultures all over the world have legends telling the story of an awful deluge that inundated ancient peoples. The stories are different in detail, but remarkably similar in at least the outline. The account of Genesis took place with real people, real cries of terror, real loss of everything. We won't be able to read all of Genesis 6 and 7 in this message.