How do us humans know that there are millions of other galaxies? If galaxies are millions of years apart, how do scientists know that there are billions of other galaxies and that andromeda is the closest?
There are a ton of extremely powerful telescopes both here on Earth and in space that is capable of looking billions of light years far. And we can see a LOT, and if we take our time to take pictures of them and study the pictures, we can then find the average amount of galaxies per volume unit, and then multiply.
The newest estimate of galaxies in the universe is about 2 trillion galaxies in the observable universe.
If galaxies are millions of lightyears away, how do we know Andromeda is the closest?
First of all, the Andromeda galaxy is NOT the closest galaxy to the Milky Way, it is the closest spiral galaxy to the Milky Way. The closest galaxy to the Milky Way is Canis Major Dwarf, a small, irregular satellite galaxy about 25,000 lightyears away.
We know it's far away simply by observing its redshift or blueshift, we do this to all galaxies observed. And just apply common sense; if you know something is close when it is.