I once did a very intense study of Genesis 1:1. Most Bible translations have it wrong. They use what is known as a "Traditional Translation."
The real translation isn't easy to put into a single English sentence. There is also a background story that needs to be taken into account:
Moses was told by God to write the story--not of the history of the World, but the story of the history of the Land of Promise that Israel was going to after being rescued from Egyptian slavery. The first sentence of Genesis is a throw away sentence.
The International Standard Version and The New Messianic Version have something like, "Beginnings. God created the Universe and Everything in it."
Moses wrote a sentence that essentially says, "Okay, look. God did a bunch of stuff in the 'Beginnings period' and I'm not going to talk about that. Let's just sum it up with this MERISM where "the Heavens and the Earth" put together to make a new concept, which is, "The Universe and Everything in it." (In law, a merism is a figure of speech by which a single thing is referred to by a conventional phrase that enumerates several of its parts, or which lists several synonyms for the same thing. In rhetoric a merism is the combination of two contrasting words, to refer to an entirety.)
In other words, sometime BEFORE Genesis 1:1, God created the Sun, Moon Stars, other planets, solar systems, Galaxies, and maybe even life in all of them. God did not want Moses focusing on all that "beginning stuff" e wanted to focus on the creation and history of the Promise Land given to Abraham and Abraham's descendants through his son, Isaac and Grandson, Jacob.
Want to learn more? Get the New Messianic Version of the Bible: www.TheMessianicBible.com