We can't measure the distance to astronomical objects directly, so we have to be creative. That's why we need the cosmic distance ladder. It's a serious of techniques we use to calculate astronomical distances indirectly.