The "beginning" referred to in Genesis 1:1 is the six days that are described in Genesis 1:3-31. We know this from Exodus 20:11 and Exodus 31:17.
Genesis 1:1 does not describe the "beginning" of the universe, nor even of the planet earth itself. At that "beginning", the planet earth already was. (Genesis 1:2)
Additionally, we read that there already "sons of God" (spirit beings) who were existing at the beginning spoken of in Genesis 1. (Job 38:47) Thus, the heavens wherein these spirit beings reside (Matthew 18:10) was already in existence at the beginning that is spoken of in Genesis 1:1. Therefore, the beginning refers to the skies (heavens) and the land mass (earth) and the order of things that are in them as seen from the surface of the planet earth (Genesis 2:1) as described in Genesis 1:3-31.