This is a sign your child has withdrawn. You could easily miss it because he may be very friendly with you, with other family members, and especially with adults. You think, “But everyone likes him.” The problem is “everyone” includes few if any young people his age.
If your child has really withdrawn from everyone, he needs immediate psychiatric help. Something drastic is happening. If the withdrawal is from other children and activities away from home, it is serious but not so much of an emergency. He still has you and others in his family.
Try two things. First, talk with him about what is going on. He may tell you what is happening and what he thinks and feels. This gives you clues about how to help. Next, back off a little from being his best friend. You are the only mother (or father) he has. That is your job. If you are his main friend, it keeps him from needing to find other friends.
Facilitate his spending more time around young people his age. You may have to push and insist a little. The best technique is to stay close but give him room to be with other children.