Astronomy is the paleontology of photons. You should take an astronomy course if you really want to know, but essentially a "ladder" was built of distances, starting with the very near and slowly building outward using various techniques and discoveries of physics as they became available. This is called the cosmic distance ladder. You start with stellar parallax, then after that you go farther with "standard candles" (particular types of variable stars). But then you have to get even further out, where you can no longer see an individual star, and then you rely on specific breeds of supernovae. Only then do you get to redshift, and compounding tons of data from step three seems to verify the redshift estimates. By the time you get to the Hubble constant, it was a huge rift between two communities over what was still a factor of two difference.
It's quite fascinating, but I can't really dump out an entire book into a comment.