How do astronomers know about other galaxies?
Other galaxies have been observed.
Astronomers have for a quite long time been able to observe other galaxies with big telescopes like the Hubble telescope. The telescopes can see very very far away.
They target a light that may look like a star, and when they zoom in they see a galaxy.