Stars, planets, solar systems, many objects in space can start as a large unstructured nebula of gas and dust, which can coalesce into massive objects under gravitational influence.
Nebula are an accumulation of gas particles.
Bearing in mind that there untold billions of atoms in the cosmos.
Any two atoms have a gravitational attraction between them. they come together, thus attracting more gas particles by gravitational attraction.
These gas particles become so crowded that they begin to glow, (the nebula).
The analogy, is a dance hall/disco; maybe two people will statr to dance. Eventually a lot more people arrive on the dance floor, and it becomes hot and crowded.
Under further gravitational attraction these hot crowded gas particles keep accumulating into a hot glowing ball. Because partiucles are now so crowded nuclear fusion starts, and releases energy. Hence a Star/Sun.
Because this process takes billions of years we do not instantaneously see it going on.
NB All stars are nuclear reactors in space.
Two events that can upset the balance between gravity and pressure in a nebula are a supernova explosion or the collision of two nebulae. A supernova explosion releases an enormous amount of energy and can disrupt the delicate equilibrium between gravity and pressure. The collision of two nebulae can also disturb the balance by introducing additional gravitational forces and increasing the overall pressure within the system.
The two main factors that cause a nebula to develop into a star are gravity and heat. Gravity pulls the gas and dust in the nebula together, causing it to collapse under its own gravity. As the collapse continues, the temperature and pressure in the core of the collapsing nebula increase, eventually reaching a point where nuclear fusion ignites, and a star is born.
the nebula starts getting smaller, smaller and smaller and slowly dis a pears it then explodes and gives nutrients to the stars around it.
No. A neutron star is quite small, generally only a few miles across. A nebula is light years across.