The Sun looks white-ish from space - not yellow at all. From the ground, it looks yellow because Earth’s atmosphere scatters blue light, leaving the warmer colors to reach our eyes. Officially, astronomers classify the Sun as a “G-type main-sequence star,” better known as a “yellow dwarf.”
That sounds modest, but it’s exactly the sort of star you want to live near. Bigger, hotter stars (called blue giants) burn through their fuel in just a few million years - not nearly enough time for slow-cooking life like ours to evolve. Smaller, dimmer stars (red dwarfs) last hundreds of billions of years, but their habitable zones are so close to the star that planets get fried by stellar flares.
Yellow dwarfs are the sweet spot. They burn steadily for about 10 billion years, giving plants and animals a long time to evolve. Their habitable zones are far enough out to be relatively calm. The Sun’s medium-sized, medium-aged, medium-temperature personality is exactly what made Earth’s biosphere possible.