As we know, stars have various functions, many of which we don't even take into account. One of them (and the most important), they serve to maintain the temperature in our world. But beyond the Milky Way, there are (logically) other stars and systems in which they belong.
Binary Stars
A very interesting system is the binary one, which is two stars which are attracted thanks to the force of gravity, one of these systems is for example the galaxy M51. These rotate one on the other, apart, thanks to this we can deduce the formula of the universal gravitational constant.
Fg = G * (m1 * m2) / r**2
Or they also allow us to discover other exoplanets, such as M51-ULS-1b, although it is also thanks or other methods used.
Cepheid Variable Stars
Cepheids are extremely important to astronomers because their periodic changes in brightness can be used to figure out how far away they are. Because Cepheids are intrinsically bright stars, they can be seen far away, and astronomers can use them to determine the distance to very distant galaxies or other astronomical bodies.