We measure the distance to nearby stars by how much they shift over the period of a year as the Earth moves around the Sun in its orbit. This is our most accurate distance measurement for objects outside of the solar system.
@kmicu Gaia is however insanely accurate in its measurement compared to Earth based measures. Accuracy in the 10s of micro-arcseconds. Thats distances out to >20kly... https://www.cosmos.esa.int/web/gaia/science-performance