The creation spoken of in Genesis 1:1 was the original creation, which preceded the restoration and further creation beginning with verse 2b.
When God created the heavens, He first stretched forth the heavens (Isa. 42:5a; Zech 12:1a). Then He created the stars. Job says that when God was creating the earth, the stars were praising God (38:7a). Hence, before God created the earth, He created the stars. God then created certain living things in the heavens. At least the angels were created then. Job 38:7b tells us that the sons of God, that is, the angels, were also present when the earth was created. One of these angels became Satan, God's enemy (Job 1:6).
The Bible says strongly that when God created, He laid the foundations of the earth (Zech. 12:1b; Job 38:4). Can we say what the earth is laid upon? The foundations of the earth are not laid upon anything. The earth has foundations, but it seemingly does not have anything supporting it. Actually, all things are upheld by Christ (Heb. 1:3; Col. 1:17). Hence, many scientists agree that there must be an Almighty One who holds the earth. This Almighty One is Christ.
When God created this earth, He measured it out and laid it on solid bases. Not only were there bases, but there were also cornerstones, marking the corners. The earth was made very well, not in a messy way. Job 38:5-6 mentions this clearly.