The Gaia space telescope has measured how fast more than a hundred thousand stars spin. It turns out that a star's rotation speed depends on its temperature. For stars cooler than 6500 degrees, the surface moves at 10–20 kilometers per second. But once a star gets hotter, the speed jumps to 100 kilometers per second.
The key lies in the magnetic field. For cool stars like our Sun, the outer layers are constantly churning like boiling porridge. This churning generates a strong magnetic field that brakes the star's rotation, like an invisible anchor. Hot stars have calm outer layers, no magnetic brake, so they spin fast.
But over time, a hot star ages and puffs up. Its outer layers start to churn, a magnetic field appears, and the rotation slows down. The astronomers confirmed this by dividing stars into age groups. Cool stars slow down steadily throughout their lives, while hot stars only slow down after they age and begin to expand.
A Sun-like star spun several times faster in its youth than it does now. Magnetic braking over billions of years has slowed its rotation.