What primarily powers the luminosity of a protostar before it becomes a true star?

Answer

Conversion of gravitational potential energy into heat

The glow of a protostar is powered temporarily by gravitational contraction. As the massive cloud collapses inward, gravitational potential energy transforms into kinetic energy, and upon impact and compression, this becomes thermal energy (heat), causing the object to radiate energy.

What primarily powers the luminosity of a protostar before it becomes a true star?
energystarsprotostarastrophysicsglow