Which statement describes the formation of stars?

They begin in nebulas.
Heat and gases contract.
Gravity causes stars to cluster.
Dust and gases contract.

Heat and gases contract.