Prefacing note: In this article, the words Elohim and God are used interchangeably. God is the English translation of the Hebrew word Elohim. They are titles, not names.
Genesis Chapter 1 is an account of creation. It is a picture of the work week of Elohim. Each of the creative days begin with the words, “And Elohim said.” Genesis 1:1-2 is a prelude to the work week. It says, “In the beginning Elohim created the heavens and the earth.” So this work has already been done “in the beginning.” If scientists think the universe is 14 billion years old, or that the Earth is 4.5 billion years old, they might be close. It really does not matter. It’s not an issue. Genesis 1:1 is simply saying, “This stuff was previously made.” Then it says in verse 2, “And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of Elohim moved upon the face of the waters.” (something is about to happen). How long was it dark on Earth? We don’t know, and it doesn’t matter.