In the beginning, God created the heavens and the earth
"This is about how God made the heavens and the earth in the beginning." This statement summarizes the rest of the chapter. Some languages translate it as "A very long time ago God created the heavens and the earth." Translate it in a way that shows this actually happened and is not just a folk story.
In the beginning
This refers to the start of the world and everything in it.
the heavens and the earth
"the sky, the ground, and everything in them"
This refers here to the sky.
without form and empty
God had not yet put the world in order.
"the water" or "the deep water" or "the vast water"
"the water" or "the surface of the water"