Stars can only form spheres if they are attractive enough, such as small celestial bodies like planets. Because they are not big enough, their attraction can't change their appearance, so their shapes are irregular.
The main reason for the rotation of the stars can be referred to the production of cotton candy. When the equipment is started, the bamboo stick rotates rapidly and the sugar filaments around it are constantly attracted. It looks irregular at first, but with extra-large milk sugar, the gathered sugar filaments will eventually become nearly spherical.
Because of the law of conservation of angular momentum, most stars in the universe are rotating, and the centripetal force of star rotation will slowly turn the star into a sphere. Because of this, most stars in the universe are not perfect spheres. The faster a star rotates, the sharper its top and the rounder its center. In a word, as long as the stars have enough gravity and rotary fitness exercise, they will eventually form a sphere, thus achieving a relatively stable situation.
On earth, gravity gives weight to objects, while the gravity of the moon causes ocean tides. The gravity of primitive gaseous substances in the universe makes them merge to form stars-and stars also gather into galaxies-so gravity is the reason for many large structures in the universe. The scope of gravity is infinite, although its influence on objects farther away is getting weaker and weaker.