They stay in their room
If a child has barred himself inside his room and has given up on social life and friends entirely, they’re in need of some serious help. Sit with your child patiently in their room and bring him snacks in there. Maybe, with time they’ll be ready to get back to the world again.