Metaphorically speaking. Only Sunday school kids should believe it literally.Because God created the heavens and the earth and all life that is in them. (Gen. 1:1-2:25) He spoke and these things came into existence.
When did this happen?
Why did he create such a vast universes. Forty billion light years across with trillions of planet earths?
Just for mankind?
You have opened up a box of more questions.