Note that “heavens” here does not necessarily mean Heaven, where God dwells, but could also mean (and likely does mean) the sky and the universe beyond as a whole. There is some dispute over whether this verse is intended to explicitly describe Creatio Ex Nihilo (creation from nothing). The translation you see above implies so, but others take a different approach. Rather than saying that the physical universe was made at the beginning, they favor formulations which imply instead that the Bible starts at the beginning of the construction of the physical universe, with no discussion of what happened prior (Rashi defends this view below). It is my belief that the two possible interpretations are intentional, and that a theological message can be gleaned from both translations – God initially created from nothing (a view clearly held by the author elsewhere in the text, whether here or not) but the Bible is specifically about the physical universe, which is narrowed onto the earth, and then to mankind, the people to whom this text is addressed. God is too great to be described in a single text, but this book is not intending to describe God as a whole. It is communicating theological truths important to mankind about the relationships between God, mankind, and the Earth, and the narrowing from heavens/skies to earth to mankind is, I believe, an attempt to set the framework for the purpose of the text as a whole.
Targum Onkelos: In the first times* the Lord created the heavens and the earth.
*Be-kadmin, “in antiquities.” The expression, when used, as here, in the plural, is sometimes put for “eternity.” Compare Onkelos on Deut. xxxiii. 27, Eloha de-milkadmin, “the Eternal God,” or, “God who is from eternity,” with Jonathan on Micah v. 2, “Messiah, . . whose name is called (milkadmin) from eternity.” (Targum.info)
Rashi: In the beginning: Said Rabbi Isaac: It was not necessary to begin the Torah except from “This month is to you,” (Exod. 12:2) which is the first commandment that the Israelites were commanded, (for the main purpose of the Torah is its commandments, and although several commandments are found in Genesis, e.g., circumcision and the prohibition of eating the thigh sinew, they could have been included together with the other commandments). Now for what reason did He commence with “In the beginning?” Because of [the verse] “The strength of His works He related to His people, to give them the inheritance of the nations” (Ps. 111:6). For if the nations of the world should say to Israel, “You are robbers, for you conquered by force the lands of the seven nations [of Canaan],” they will reply, “The entire earth belongs to the Holy One, blessed be He; He created it (this we learn from the story of the Creation) and gave it to whomever He deemed proper When He wished, He gave it to them, and when He wished, He took it away from them and gave it to us.
In the beginning of God’s creation of: Heb. בְּרֵאשִית בָּרָא. This verse calls for a midrashic interpretation [because according to its simple interpretation, the vowelization of the word בָּרָא, should be different, as Rashi explains further]. It teaches us that the sequence of the Creation as written is impossible, as is written immediately below] as our Rabbis stated (Letters of R. Akiva , letter “beth” ; Gen. Rabbah 1:6; Lev. Rabbah 36:4): [God created the world] for the sake of the Torah, which is called (Prov. 8:22): “the beginning of His way,” and for the sake of Israel, who are called (Jer. 2:3) “the first of His grain.” But if you wish to explain it according to its simple meaning, explain it thus: “At the beginning of the creation of heaven and earth, the earth was astonishing with emptiness, and darkness…and God said, ‘Let there be light.’” But Scripture did not come to teach the sequence of the Creation, to say that these came first, for if it came to teach this, it should have written:“At first (בָּרִאשׁוֹנָה) He created the heavens and the earth,” for there is no רֵאשִׁית in Scripture that is not connected to the following word, [i.e., in the construct state] like (ibid. 27:1):“In the beginning of (בְּרֵאשִית) the reign of Jehoiakim” ; (below 10:10)“the beginning of (רֵאשִׁית) his reign” ; (Deut. 18:4)“the first (רֵאשִׁית) of your corn.” Here too, you say בְּרֵאשִׁית בָּרָא אלֹהִים, like בְּרֵאשִׁית בְּרֹא, in the beginning of creating. And similar to this is,“At the beginning of the Lord’s speaking (דִּבֶּר) to Hosea,” (Hos. 1:2), i.e., at the beginning of the speaking (דִּבּוּרוֹ) of the Holy One, Blessed be He, to Hosea, “the Lord said to Hosea, etc.” Now if you say that it came to teach that these (i.e., heaven and earth) were created first, and that its meaning is: In the beginning of all, He created these-and that there are elliptical verses that omit one word, like (Job 3:10): “For [He] did not shut the doors of my [mother’s] womb,” and it does not explain who it was who shut [the womb]; and like (Isa. 8:4): “he will carry off the wealth of Damascus,” and it does not explain who will carry it off; and like (Amos 6:12): “or will one plow with cattle,” and it does not explain: “if a man will plow with cattle” ; and like (Isa. 46: 10): “telling the end from the beginning,” and it does not explain that [it means] telling the end of a matter from the beginning of a matter-if so, [if you say that Scripture indicates the order of creation] be astounded at yourself, for the water preceded, as it is written: “and the spirit of God hovered over the face of the water,” and Scripture did not yet disclose when the creation of water took place! From this you learn that the water preceded the earth. Moreover, the heavens were created from fire and water. Perforce, you must admit that Scripture did not teach us anything about the sequence of the earlier and the later [acts of creation].
God’s creation of the heavens and the earth: But it does not say “of the Lord’s creation of” (i.e., it should say “of the Lord God’s creation of” as below 2:4 “on the day that the Lord God made earth and heaven”) for in the beginning it was His intention to create it with the Divine Standard of Justice, but he perceived that the world would not endure; so He preceded it with the Divine Standard of Mercy, allying it with the Divine Standard of Justice, and that is the reason it is written:“on the day the Lord God made earth and heaven.”
Rambam: Through the Ten Sefirot, God created, from absolute nothingness, the prime matter of the heavens and all it would contain and the prime matter of the earth and all that it would contain.
Ibn Ezra: In the beginning of God’s creating, God used natural forces to set boundaries, forming the created ante-mundane matter into the visible sky, the invisible spheres, and the dry land