The keyword you are looking for is the cosmic distance ladder. There are a rather lot of different ways and they work best at different ranges.
https://en.m.wikipedia.org/wiki/Cosmic_distance_ladder
To the moon we can get absurdly accurate measurement by bouncing lasers off mirrors left by the Apollo missions. It’s accurate to something like 1.6mm.
To to Venus we can actually bounce radar off of it. That gives us some baseline from which we can calculate distances using angles between planets during different parts of the earth’s orbit. Actually at this point we have used radar to figure distances to all the planets except Pluto, but Pluto got kicked out anyway. If you don’t want to go too much into it you can just say -really- big RADAR dishes and that legitimately covers most of the solar system.
We can also use the parallax (differences in observed position between near and far stuff while the earth orbits the sun) to figure distance to nearby stars.
Further out we can use the light intensity of certain types of stars to gauge their distance. And several other methods for even further stuff. Since the ranges of different measurement techniques overlap we can link them together to estimate the distance across the whole range of objects we can see. Thus making a “ladder” with the different measurement methods as rungs.
We can also work backwards from the farthest objects using leftover radiation from the big bang.
And something -really- interesting is that our best estimates and theories allow us to calculate the range to a degree of accuracy that lets us know that when you work from the Earth out, and from the farthest stuff the the numbers don’t meet in the middle, called hubble tension. The space near us appears to be expanding a little too quickly. Something is wrong -somewhere- and no one really knows why.
Latest Answers