The first the words of the Bible. Why does this mean the beginning of the universe?
Well, it kinds of explains itself by saying, 'in the beginning God created the heavens and the earth'. This refers then to when God began creating the physical realm.
There is another beginning that begins prior to the physical realms creation. In Micah we read:
Micah 5: 2 But thou, Beth-lehem Ephrathah, which art little to be among the thousands of Judah, out of thee shall one come forth unto me that is to be ruler in Israel; whose goings forth are from of old, from everlasting. ASV
2 Thou, therefore, Bethlehem Ephrathah, though, little, to be among the thousands of Judah, out of thee, shall Mine come forth, to be ruler in Israel,—whose comings forth, have been from of old, from the days of age-past time. (Rotherham)
And, Proverbs where Wisdom personified refers to our Jesus before he came to earth:
Prov 8:
22 Jehovah possessed me in the beginning of his way, Before his works of old. 23 I was set up from everlasting, from the beginning, Before the earth was. 24 When there were no depths, I was brought forth, When there were no fountains abounding with water. 25 Before the mountains were settled, Before the hills was I brought forth; 26 While as yet he had not made the earth, nor the fields, Nor the beginning of the dust of the world. 27 When he established the heavens, I was there: When he set a circle upon the face of the deep, 28 When he made firm the skies above, When the fountains of the deep became strong, 29 When he gave to the sea its bound, That the waters should not transgress his commandment, When he marked out the foundations of the earth; 30 Then I was by him, as a master workman; And I was daily his delight, Rejoicing always before him, 31 Rejoicing in his habitable earth; And my delight was with the sons of men.
From this we know that God began his creative works by creating our Lord Jesus. After that, obviously he created the angels, BUT !
From this point we are told that all things God created were created by means and through Jesus. In this way, Jesus is the only begotten first born of all beings and things.
So, the beginning refers to when God created Jesus, the angels, the physical universe we live in, and the earth - and in that order of sequence though the earth of course has been created fairly late in the scope of things if scientists have the ages correct when speaking of the age of the universe and earth. Even now, things in the heavens are not static.