Does entropy decrease when stars are created from a dust?
Does entropy decrease when water freezes?
The total entropy of the universe increases in both cases.
However, a significant amount of entropy is moved from one region of the universe to the other in both cases. This creates an illusion that entropy has increased.
In the case of the water, entropy decreases in the part of the liquid water that become solid. However, the water that freezes to ice gives off heat to the remaining water. This heat is absorbed by a cold reservoir. So the entropy of the cold reservoir increases. The increase of entropy in the reservoir far exceeds the decrease in entropy in the part of the water that freezes.
Similar arguments apply to the star in formation. Only part of the gas cloud gets collected in the star. There is a decrease in entropy in that part of the gas cloud that becomes a star. In this case, heat is given off to the remaining gas. The temperature of the remaining gas goes up. So the entropy of the remaining gas increases.
The gas cloud gives off heat to the surrounding universe. This results in an increase of entropy in the entire universe.
It is important to distinguish between moving entropy elsewhere and destroying entropy. Entropy can decrease in a small area by moving the entropy somewhere else. Entropy is not destroyed in such a process. Many physics newbies don't appreciate the fact that entropy can move.
Every refrigerator and every air conditioner has a device for moving hot air somewhere else. There is a great deal of entropy created in the air that is heated. Furthermore, entropy from the cooled region gets shoved into this hot air. So while the entropy decreases in the cooled region, it increases everywhere else.