Sun is a yellow dwarf star and classified in the dwarf star category. This is because it falls in the group where the stars have a temperature of 5300 K to 6000 K. these stars often fuse hydrogen into helium to generate the light and heat energy. Such stars often las for 10 billion years.
This is the categorization, which is why sun is placed in the dwarf category. There are other stars that are much larger and have higher temperatures that are placed in different categories. Earth cannot stand the heat of such stars which is why they are thankfully far away from our solar system.