This question already has an answer here:
Ok I know this has been asked a lot but I'm still a bit confused. After big bang, there are a lot of equally distributed elementary particles around with evenly distributed heat(or photons). So why doesn't the universe stays at this max entropy and instead opted to form star, only to distribute heat evenly again? Please direct me to an answer if it exists.