From the NIV
1 In the beginning God created the heavens and the earth. 2 Now the earth was formless and empty, darkness was over the surface of the deep, and the Spirit of God was hovering over the waters.
Two points... first, the "heavens" are a billion billion billion times larger than the earth. Second, the final description is of a formless ocean sitting in the dark.
3 And God said, “Let there be light,” and there was light. 4 God saw that the light was good, and he separated the light from the darkness. 5 God called the light “day,” and the darkness he called “night.” And there was evening, and there was morning—the first day.
So before god created the sun or stars, there was light that made day and night?
6 And God said, “Let there be a vault between the waters to separate water from water.” 7 So God made the vault and separated the water under the vault from the water above it. And it was so. 8 God called the vault “sky.” And there was evening, and there was morning—the second day.
In other words, above the sky is more ocean, and when God wants it to rain, he "opens up the heavens". JST, the birds fly in this "vault" of air between the ocean below us and the ocean above us. Again we have day and night without the sun.
9 And God said, “Let the water under the sky be gathered to one place, and let dry ground appear.” And it was so. 10 God called the dry ground “land,” and the gathered waters he called “seas.” And God saw that it was good.
11 Then God said, “Let the land produce vegetation: seed-bearing plants and trees on the land that bear fruit with seed in it, according to their various kinds.” And it was so. 12 The land produced vegetation: plants bearing seed according to their kinds and trees bearing fruit with seed in it according to their kinds. And God saw that it was good. 13 And there was evening, and there was morning—the third day.
Note that all biological and fossil records indicate that life started under water and was neither plant nor animal, then eventually split into basic plants and basic animals. Still, here, we have plants existing and day and night existing and no sun yet.
14 And God said, “Let there be lights in the vault of the sky to separate the day from the night, and let them serve as signs to mark sacred times, and days and years, 15 and let them be lights in the vault of the sky to give light on the earth.” And it was so. 16 God made two great lights—the greater light to govern the day and the lesser light to govern the night. He also made the stars. 17 God set them in the vault of the sky to give light on the earth, 18 to govern the day and the night, and to separate light from darkness. And God saw that it was good. 19 And there was evening, and there was morning—the fourth day.
So god created the "heavens" and the "earth" on day one and night and day on day two... but now he gets around to creating the sun, moon, and stars which are described as lights that we can use to help us govern our time.
20 And God said, “Let the water teem with living creatures, and let birds fly above the earth across the vault of the sky.” 21 So God created the great creatures of the sea and every living thing with which the water teems and that moves about in it, according to their kinds, and every winged bird according to its kind. And God saw that it was good. 22 God blessed them and said, “Be fruitful and increase in number and fill the water in the seas, and let the birds increase on the earth.” 23 And there was evening, and there was morning—the fifth day.
Note that life began in water... not as plants on ground... and birds came way after that.
24 And God said, “Let the land produce living creatures according to their kinds: the livestock, the creatures that move along the ground, and the wild animals, each according to its kind.” And it was so. 25 God made the wild animals according to their kinds, the livestock according to their kinds, and all the creatures that move along the ground according to their kinds. And God saw that it was good.
26 Then God said, “Let us make mankind in our image, in our likeness, so that they may rule over the fish in the sea and the birds in the sky, over the livestock and all the wild animals,[a] and over all the creatures that move along the ground.”
27 So God created mankind in his own image,
in the image of God he created them;
male and female he created them.
Not much more to add here other than I didn't want any believers to claim I took anything out of context.
As Foxy Freedom and Graybeard point out, the idea that the earth is "spread out" and that the sun is moving in the sky for our benefit are supported by later biblical verses.
We're not misunderstanding this or taking it out of context... the Bible is just wrong on these counts.
It'd be an amazing book if, in Genesis... can you imagine if it described the rotation of the planets and stars as giant glowing balls of fire? Before we had any ability to know this? Wow, what an amazing book it would be if it wasn't just fables invented by bronze age goat herders.