The expansion of the universe has been observed for quite some time now. However, it wasn't until recent years that scientists could accurately measure the distance between objects across the cosmos. By measuring the distances between galaxies, astronomers can calculate how fast the universe is expanding.
The spectrum of light helped scientists to determine the speed of the universe’s expansion. Through the Hubble telescope, scientists can detect that the light emitted from stars is redder than expected. This is because the light is stretched out when traveling through space. The further away an object is, the more stretched out the light becomes. As a result, the light appears to be redder.
Astronomers use this information to calculate the rate at which the universe is expanding. If they find that the light is getting redder, then they know that the universe is expanding faster. In addition, they can also estimate the size of the universe.