Why are accretion disks around neutron stars or black holes significantly hotter than those around protostars?

Answer

The immense gravitational pull releases vast energy as gas accelerates and rubs together

The immense gravitational field near a compact object causes the infalling gas to move at very high speeds. The friction generated by this acceleration and rubbing releases vast amounts of energy, resulting in extremely high temperatures and X-ray emission.

Why are accretion disks around neutron stars or black holes significantly hotter than those around protostars?
Geologyprocessplanetmassaccretion