How do spectroscopes help with studying of distance stars?

It measures the distance of faraway stars.
It collects sound waves from distant stars.
It breaks apart lights that comes from stars faraway.
It gives a clear image of the shape of stars.