The lack of understanding cosmology is yours. The universe existed before there were stars and before there was light;
Have you heard of the dark ages?
''Long ago, millions of years before the first star sparked to life, the entire universe was a sea of darkness.
Beginning about 400,000 years after the
Big Bang and lasting hundreds of millions of years, this so-called
dark age of the universe marked the last time when empty space really was empty; no planets, no suns, no galaxies, no life — just a fog of hydrogen atoms forged by the Big Bang and left to slosh through the darkness.''
https://www.space.com/neutral-hydrogen-dark-ages-of-universe.html