How can the observable universe be so small if there are so many stars in it?
If you know the total number $N$ of galaxies, and you know the size $V$ of the (observable) Universe, then you can calculate the number density $n = N/V$ and mean distance (of the order $1/n^{1/3}$) between galaxies, and convince yourself that it actually works out fine.

However, the reason we know how many galaxies are in the observable Universe in the first place is the other way round:


Observe an average number density of galaxies (which of course varies quite a lot from dense clusters to voids).
Calculate the size of the Universe by integrating the Friedmann equation (using as input observed values of the densities of the constituents of the Universe; dark energy, dark matter, gas, stars, radiation, etc.).
Finally, multiply the two numbers to get the total number.


Note that when observing the number density, we must not look too far away from the local Universe, since this means looking back in time to a period where the number density was different from present-day's value.