It all started with knowing the distance from the earth to the sun. Nobody had a clue until Richer and Cassini got within 10% in 1672. Then we nailed it down in 1769 with James Cook's voyage to Tahiti, the primary purpose of which was to observe the transit of Venus from the other side of the world.
From there if you know basic geometry, you can observe the nearby stars shift a bit when the earth goes around the sun (parallax), but that only works to about 10k light years.
Then, we discovered a couple unbelievably convenient astrophysics hacks: Cepheid variables (Henrietta Swan Leavitt, 1908) and Type 1A supernovae (Subrahmanyan Chandrasekhar, 1935, the namesake of the Chandra X-Ray Observatory). These allowed us to move out a couple more rungs on the ladder.
From there, the relationship between redshift and distance becomes significant and that takes us to the edge.
https://www.uwa.edu.au/science/-/media/Faculties/Science/Doc...