Nonmetal X is the main component present in stars. Name the nonmetal X.
Hydrogen
Hydrogen forms the major component of stars. Since the Sun is also a star, it forms the major component of the Sun as well.
And most of our universe is just stars burning away. So hydrogen is the most abundant element in the whole universe making up more than 75% of the universe!