The Sun formed when a rotating cloud of gas and dust that was bigger than our present solar system contracted under the influence of its own gravity. According to conservation of ____ momentum, as the cloud shrunk in size, its rotation period (i.e., the time needed to rotate once around its axis) decreased.
In order to conserve the angular momentum, the reduction in size of a gas cloud will results in the rise of it's rotational speed. Which reduces the time period of rotation.