Historically the Universe was once believed to be finite. Finite means its volume is a finite number. Also the biblical view is and was that the Universe was created approximately some 4000 years before the. Psalms 147:4 declares,
“He [God] tells the number of the stars; He [God] calls them all by their names.” (KJVER).
To ‘tell’ means to count and therefore the implication is that the Universe contains a fixed or finite number of stars and hence of galaxies. Only God is infinite (Ps 147:5) but His created Universe is finite and even bounded. That means it has a centre and an edge.
The view was not universally held though. Hindu texts seemed to indicate an eternal, albeit a cyclical universe and infinite in size. But our modern scientific understanding of the Universe has developed from Judeo-Christian beliefs. Within that framework, until essentially the beginning of the 20th century it was accepted the Universe was like a ball of stars around our planet Earth.
Only with Edwin Hubble’s observations did this notion change, as he settled the big debate of the 1920’s, showing in 1929 that the Universe contained many galaxies like our own. Secondly, by observations of redshifts of galaxies and their distances, he discovered that the Universe is expanding, for which he would have won the Nobel Prize, but the selection committee followed the rules established by Nobel (who disliked astronomers) and would not award it to him. He died before they changed the rules. Nevertheless Hubble himself even questioned his own conclusion over the decades following his “discovery.” (I would note here that Lemaître published before Hubble, in 1927, wherein Lemaître developed the now famous relation, the Hubble law–later named after Hubble–but also Lemaître fitted to actual observational data, though his data were a bit poorer quality than Hubble’s in 1929.)
But then until the mid 1960’s, the dominant cosmological belief for the Universe, was the Steady State (SS) cosmology. It held to an eternal (non-cyclical) universe, which was infinite and unbounded. With Hubble’s discovery of an expanding universe and then the discovery of the Cosmic Microwave background radiation (1965) Hoyle and Geoffrey Burbidge modified (1993) their SS model to incorporate cyclical periods of expansion and collapse, yet still an eternal universe–called the Quasi Steady State Creation (QSSC) cosmology.