Once we look beyond the solar system, most of what we can learn about the Universe is based on observing stars. They emit photons profusely, and we have the means to study photons in detail. We can study their life cycles, how they are distributed in space, how they group into clusters and galaxies, their effects on the surrounding gas and dust. Fortunately, stars are profoundly important for our Universe, even though they do not dominate its total material (most is in a dark form that we know little about). Not only do they light up the sky, they produce the raw materials that make life possible, and if there is life out there, it is most likely orbiting a star on its planet.
We compensate for the relatively little we can learn about a single, typical star by studying them in large numbers and trying to understand how the properties change in groups that may include a range of masses, ages, and so forth. In this way, we have put together a surprisingly detailed picture of how they work.