The Bible tells us that:
"In the beginning God created the heavens and the earth. The earth was formless and void, and darkness was over the surface of the deep, and the Spirit of God was moving over the surface of the waters." (Genesis 1:1-2)
This means God created the earth (verse 1), but it had not been completed yet (verse 2). "Formless and void" is better translated to mean "unformed and unfilled".
It does not mean "not existent", because in verse 1 we see that God started the creation of the earth.
In fact, God called the dry land "earth": "God called the dry land earth, and the gathering of the waters He called seas" (Genesis 1:10).
So the earth was hidden by the waters and without distinct form. And before God filled it with plants, animals, and mankind, the earth was void or unfilled.
Also, before God created light for the universe, there was darkness. In other words, it was dark because there was no light.
---
For a more scientific and detailed look into what the waters of day 2 were, please see the following article:
https://answersingenesis.org/astronomy/cosmology/what-were-waters-day-two/
To summarize the above article briefly, the expanse that God created in the midst of the waters is space (including our atmosphere) (Genesis 1:6-7). The Bible tells us there are three heavens (2 Corinthians 12:2). The first heaven is where the birds and clouds are (i.e. sky). The second heaven is where the astronomical bodies are (i.e. outer space). The third heaven is where God dwells (i.e. Paradise).
The Bible suggests that our universe is finite and there is water at the boundary of our universe due to the waters of creation.
Although there is no scientific proof of this yet, there may be some evidence of this from the discovery of cosmic radiation background (CMB).
---
As a final note, we should humbly consider that humans are still in the discovery process of how our universe works. Even though mankind has many impressive technologies (like rockets and shuttles to space), mankind is not all-knowing. It was just within the past few hundred years that we have made great scientific advancements.
But we should not assume that where we are today in our discoveries is where we have knowledge of all-encompassing truth. It would be hubris to assume so.
Just as scientists can tell you how they built their rockets (because they were the ones who created that technology), so only the Creator can tell you how He made the universe. And He has done that through the Bible.
We need to be humble in our discoveries, because mankind is fallible and still only knows in part.
Some day we will understand and discover more fully of what God has made.