The earth was already flourishing with life prior to man. Life that has went extinct in several eras, after which all new forms of life arose. Then the last catastrophe struck.
In the oldest manuscripts there is a mark of a pause between the first and second verse. It may be as science tells us, that this globe existed millions of years ago; that it has been the habitation of numerous and varied races of animated beings; and that it has undergone many great destruction's and creations before it was brought into its present state: none of these views are in the least discordant with the statement of the inspired historian, that “in beginning God created the heavens and the earth.”
In twenty places in this chapter the verb “was” is used as the equivalent to “became”. The true meaning of the Hebrew word "hayah".
The Earth "became" desolate and waste, (tohu wa bohu - used nowhere else together in the Bible except this verse and two other places, and always when used elsewhere point to a once flourishing condition that was then laid waste - Gen 1:2; Isa. 34:11; Jer. 4:23) and darkness overspread the Earth. At this time (man) did not exist prior, nor any of the current animals found with skeletons of modern man, except in a few rare cases as in one or two classes of reptiles and fish that survived this worldwide cataclysm, and the untold number before, told of before science had ever thought of such a thing as possible.
Comet, meteor, fallen angels? Who knows? It is quite accurate when interpreted properly. After unknown periods of time another act of creation occurred, this time with a notable exception, one worth bothering to describe in more detail, unlike any others that may have occurred previously. But then a new creation happened, the waters were separated from the waters (evaporation). "Let there be light...divided the light from the darkness". In Hebrew literally: " divided between the light and between darkness." Where all had previously been darkness due to the destruction, the addition of heat began separating the clouds. The events in the entire chapter are described as if one's viewpoint is from the earth.
It must be noted that the word 'ohr is not the same word used in verse 14 signifying "lights," or "luminaries," ma-'ohr; rather, it signifies "heat." the effect, which immediately followed is described in the name Day, which in Hebrew signifies "warmth."
So heat began penetrating into the depths after God acted, separating the clouds, letting light into the depths, the clouds had been so low as to contact the Earth itself. But heat allowed evaporation and the waters above were separated from the waters below and dry land appeared.
Every past form of life sprang from nowhere, lived for a time, different breeds of that kind prospering, then went extinct due to cataclysmic actions. In its place all new life once again sprang up, to again repeat the cycle. The Bible just affirms this, when it told you of the earth becoming desolate and waste, and the darkness that became upon it, encompassing it around. Hence the dinosaurs died out. It then described the "sixth" such event, when man himself was created.
There have been 5 - count them, 5 major extinction events. Mankind and the animals with him were created "after" this 5th extinction event, the 6th creative act.
Extinction event - Wikipedia
Soon there will be a sixth destruction and then a seventh and final creation, in which all new yet similar lifeforms will appear, such as a lion-like creature that eats straw.