Around 250 BC, he developed a method based on observing the phases of the Moon and using geometry. He reasoned that when the Moon is exactly half-illuminated, the angle between the Sun, Earth, and Moon forms a right angle. By measuring the angle between the Sun and Moon at this point, he could estimate the relative distances.
Although his method was ingenious, Aristarchus' measurements were far from accurate due to limitations in his observational tools and understanding of the solar system. However, his attempt laid the groundwork for later astronomers to refine these measurements.