It is not a wise thing to do to test scripture to align with the scientific narrative of creation, especially in relation to the chronology of the creation of various entities. This is not because they contradict, but simply because Scripture has a metaphysical underpinning which science is unable to take into account.
For example, time as we know it is demarcated by the objects in the space (heavenly bodies) and forces of interactions between them. These themselves are created in the third day of the Genesis narrative. So, what day one represents is not our familiar physical time (which was only created in day three). Neither the order of the days represents the chronology of creation. Rather, the creation narrative should be attempted to be seen, with fear and trembling, from God’s perspective, which is outside time.
A helpful way to think of the creation of the elements could be to think of their creation in the metaphysical universe. That is, when God creates light, light is created not only as the phenomenon we commonly experience, but also as the meaningful concept that we understand it to be. Not only there is no light before God creates it, there is no concept of it either.
Therefore, it is silly to be bogged down with questions like - how is there water before light, and vegetation before stars!
But what then is the point of seven days of creation? Why is it recorded the way it is?
The author(s) of Genesis, like everywhere else in Scripture, are attempting to tell a story. This story would give us insights on God’s character and purposes.
Initially, God creates the canvas for creation - the heavens and the earth. This is in a state of chaos. What follows is an act of separation, which, one can ponder and understand, is in itself an act of creation. God creates and separates to demarcate the high and the low. God separates darkness from light, water from the sky.
What follows is a alternating emergence of “order” from the lows and highs respectively. The lows are gradually lifted and the highs stooped - all in anticipation of a distant union. For example, from the lows God brings up land, vegetation, animals. From the highs comes down the sky, the stars, the birds. God bridges, that is, determines relationships between what he separated by gradually filling the chaos with order, and stooping the heavens and lifting the earth.
Finally, God makes man from the dust of the earth, and fills him with His breath to institute the ultimate bridge between the highs and the lows, the final creation to complete His willed order in the universe. This narrative is instituted and carried forward in the rest of the Bible. We learn eventually that the man fails to hold his purpose, and he stoops to the lows of the low. This leaves a gaping void in creation. What was supposed to be in unity remains disjoint! Later, God Himself descends to to be born in flesh as the perfect human, and act as the perfect union between Heaven and Earth, according to His original purpose as conveyed in Genesis one.