The text only says God separated light from darkness.
It does not say He turned the light off each night.
It could be a spatial separation, where one region experienced light while another experienced darkness, or some other arrangement known only to God.
I'm not arguing with you here, just giving my take, which is worth what you paid.
In the beginning God created the heaven and the earth.
The beginning is self explanatory, and logically there should be an end, no?
The heaven (small "h") is all space in the universe coming into existence. Most translations render it "heavens", but that's incorrect, and values matter here.
The earth (small "e") is all matter in the universe coming into existence as one body of water. The "face" of the deep, singular. Again, values matter.
At that point the aforementioned body of water is in total darkness, either literally or figuratively.
God then declares "light"
(Heat? The electromagnetic spectrum? Electricity itself? A positive charge to darkness's negative charge?) into existence, sees that it's like Himself, then separates it from the darkness? Who can fathom what that even means or looked like? Certainly not I, but I feel like (Yes, my feelings!) it's basically God charging the great cosmic Battery that powers the universe to this day, and like all batteries, it has a finite quantity of power.
Comparative mythology suggests that multiple "gods" created everything, and Job 38 reveals that the angels at least witnessed, and possibly participated in, some or all of the Creation. I could go on about this but it might make somebody hysterical and report me for heresy, so I'll quit here.