Heat a piece of iron. Go and see.
You will find that the temperature is getting higher and it starts to turn yellow-red-white-blue, which means it emits more blue light than red light.
The temperature is high when the light is white,
Stars that emit blue light indicate that the surface temperature is very high. Why is the surface temperature high? The greater the necessary mass, the greater the internal stress of the star, and the more intense the nuclear fusion reaction under such strong gravity.
That is, the higher the internal temperature.
The higher the natural surface temperature.
If it helps you, please adopt it.