How astronomer measure the distance between galaxies?
By the red shifts of the measurement. Or to make a short story long it’s the displacement of features in the spectra of astronomical objects, such as galaxies and quasars, towards the longer wavelengths, generally interpreted as a result of the Doppler effect due to their recessional velocities (i.e. how fast they’re moving away from something) The expansion of the universe means that all but the nearest galaxies have redshifted spectra (in fact this is what led to the discovery of the expanding universe back in the 1920’s). Hubble first described this back in 1925 that the redshift or recession velocity of a galaxy is proportional to the distance in relationship with the viewer.