Note that the word for Spirit hear is breath or wind, and that, later in the text, Adam is brought to life with the breath of God. This kind of verbage – wind or breath for soul or spirit – is common in the ancient world. This topic will be discussed in greater detail in the commentary on Genesis 2:7
More important for this verse is to address pagan parallels to the Creation account. You can read an article on the topic here, and I would encourage you to do so for a more thorough explanation of this topic One of the points made in that article is that the wording of this verse appears to be very similar to portions of the Babylonian Creation myth found at the beginning of the Enuma Elish. Furthermore, the text, which features the Wind of God hovering over the Deep, is etymologically and symbolically similar to the Wind God, Marduk, King of the gods, defeating the goddess of the Deep, Tiamat. Marduk goes on to divide Tiamat* (the waters/deep) to make the firmament/sky above and the waters below, which is not unlike what God does to the waters in verse 7. Here both are replaced with a single God, a loud declaration of monotheism directed at the polytheistic cultures of the day. Elsewhere in early Genesis, God often refers to himself the way a head deity often referred to his heavenly council, and the message is the same – demythologizing mythology, using polytheistic imagery to paint a picture of monotheism.
The idea that it is a response to pagan imagery solves a lot of the problems often raised with the text, and prevents us from having to do things like Onkelos does (turning the Spirit of God into a wind from before God to solve the problem of God’s omnipresence with him hovering over something). These solutions often leave us wondering what the meaning of the passage is, anyway, which to me makes them seem like bad solutions, since the meaning/intent behind the passage, more than any literal statement, is the primary purpose behind the text being written.
*many scholars believe that the Hebrew word used in the verse, Tehom, is the Hebrew rendition of the name of Tiamat, stripped of her godhood and simply a mindless force of nature, subject to the Will of God
Targum Onkelos: And the earth was waste and empty, and darkness was upon the face of the abyss; and a wind from before the Lord blew upon the face of the waters.
Rashi: astonishingly empty: Heb. תֹהוּ וָבֹהוּ. The word תֹהוּ is an expression of astonishment and desolation, that a person wonders and is astonished at the emptiness therein.
astonishingly empty: Astordison in Old French; [étourdissement in modern French], astonishment. בֹהוּ an expression of emptiness and desolation. (This does not appear in all editions.)
בֹהוּ: an expression of emptiness and desolation. (This does not appear in all editions.)
on the face of the deep: on the face of the waters which were on the earth.
and the spirit of God was hovering: The Throne of Glory was suspended in the air and hovered over the face of the water with the breath of the mouth of the Holy One, blessed be He and with His word, like a dove, which hovers over the nest, acoveter in Old French, to cover, hover over.
Rambam: The lower prime matter, after its creation from nothingness, was completely prime matter, that is matter without substance. God then clothed it in four forms: fire was above the water-earth, and air was above the water.
Ibn Ezra: The dry land was an empty waste because it was covered by darkness and water, and the wind of God blew over the waters.