There may be many reasons why your dog may not play with others. It's possible that your dog is sick, or that your dog is tired or uncomfortable. A dog may also be reluctant to play because it encounters something that makes it feel uneasy or frightened. A dog's personality can also affect his or her willingness to play. Some dogs may be more introverted and don't like to be around people or other dogs.
Some dogs may be more enthusiastic and like to play. If your dog doesn't want to play, it's recommended that you take him to a veterinarian to make sure he doesn't have any medical issues. If everything is normal, you can try to provide your dog with appropriate activities and exercise opportunities, such as walking, training, games, etc., to help it maintain physical and mental health.