The Jewish interpretation is that god created the universe at first light on the first day.
On the first day god created the waters.
On the second day god divided the waters with a firmament in the midst of the waters, which god called heaven.
On the third day dry land appeared when the waters under heaven were gathered into one place. Nothing said about the waters over heaven. The dry land he called earth. So earth refers only to dry land.
The very first sentence in the Torah:
"In the beginning God created the heaven and the earth." is considered in Judaism to be a summary of what was to happen on the succeeding days. If not the Torah is not self-consistent. The modern Jewish interpretation is that the waters over which the spirit of god hovered are cosmic and associated with the creation of the universe.
By the way god did not create modern cosmology. It is a theory of modern physics and is manmade or rather invented.
So the answer to your question is that Jews consider that the universe was created on the first day. Since the sun was created on the fourth day (or perhaps the third day as mentioned above), that was the first day that in which the earth experienced night and day. So the lengths of the two previous days refered to in the Torah are not known. That is the evidence that the length of a day in the Torah is not 24 hours. The modern Jewish intrepertation is that the word 'day' refers to epochs rather than 24 hours.
The interpretation of most Christian churches, like the Anglican Church that I grew up in as well as the Congregational Chirch that I was baptized in agrees with the Jewish interpretation. The fundamentalist christian churches do not agree with this interpretation, nor do Orthadox Jews.
Lastly on the fourth day, the stars in the heaven were created. Astronomers can measure how old the light from those stars is, and for almost every star we can see, the age of that light exceeds 6,000 years.
So you have a choice to either believe in astronomy or believe in a literal interpretation of the Torah.
Now the literal interpretation is actually not logical, for on the sixth day animals including man. But later on in Genesis chap 2 verse 7 god made man from the dust of the ground. At that time no shrub or herb had yet formed because it had not yet rained. Yet on day 3, 1:11, God said: "Let the earth put forth grass, herb yielding seed, .... and the earth brought forth grass, ... all without the benefit of rain.
That is illogical, just as having grass and trees before having a sun.
I suppose you can claim that god is capable of doing anything, whether logical or illogical. But the way the Torah reads, it is clearly illogical on the basis of science.