* The Earth formed over millions of years: There wasn't a single "day" when the Earth suddenly appeared. It formed gradually from a swirling disk of dust and gas.
* No Sun, no Day/Night: Early in its formation, the Earth didn't have a sun yet. The sun formed separately from the same cloud of gas and dust. Without a sun, there would have been no light to create day and night.
* Day/Night Cycles Emerged Later: Once the sun formed and the Earth settled into its orbit, we started experiencing regular day/night cycles.
So, the Earth wasn't "day" or "night" during its formation, as the concept of day and night didn't exist yet. It was a very hot, chaotic, and constantly changing environment.