How do astronomers test the theories of star formation?
There are a lot of 'em to observe.
There are a lot of stars we can observe... and they are not all the same. Like, there are some stars like our sun or its twin stars. From them, we know they are in the same evolutionary phase as our sun.
We see more red dwarfs rather than white dwarfs or red dwarfs... which means stars almost don't start out as black dwarfs.
We see a lot of young stars at the center of many gas clouds (stellar nubula) which means they probably begin their lives in these gas clouds slowly by starting nuclear fusion by the gravity of that collapsing gas (mostly Hydrogen).
SN1987A is a supernovae, first seen during the night of February 23-24, 1987. It was the closest observed supernova since 1604. How did it get there? The only possible explanation is that a blue giant
This list goes on very long, but I hope you got the point.