I see the creation story from Genesis 1 as a pre-scientific attempt to explain the world and its origins.
A person with no scientific knowledge can easily see that much of the light comes from the skies, whether the blue sky or the clouds. Without scientific knowledge, there is no reason that you would assume this light to be scattered or reflected light that originated in the sun.
The light from Genesis 1:3-1:5 was simply this background of light, presumed to be independent of the sun.
The firmament of 1:6-1:8 surely refers to apparent appearance of the sky as a dome over the earth. It was taken to be some kind of ceiling, and "Heaven" was the name given to this ceiling. Thus "heaven" means the same thing as "sky", the apparent domed ceiling above the earth.
The sun and moon obviously had to come later (1:14-1:19). For they were lights to be mounted in the ceiling, and God could not do that until after the ceiling had been installed.
This is the quite obvious literal reading of Genesis 1. In the light of modern day science, it is nonsense. In the light of modern day Christianity it is nonsense, for the modern notion of "heaven" is of a spiritual realm, not of a domed ceiling over the earth.
It makes you wonder about modern day people who consider themselves literalists.
My own conclusion, when I was a teenage evangelical, was that one had to understand the Bible as the writings of men (and women), not as the direct word of God. These men and women may well have been inspired, but what they wrote was not inerrant.
The authors of Genesis may well have done the best possible, given what was known to them at the time. It would be unrealistic for us to fault them, simply because what they wrote is inconsistent with our modern understanding of science, and our modern understanding of heavan. But it ought to be clear that modern literalism is foolish, as is the idea that the Bible is the inerrant direct word of God.