My son was a shy but happy child.
Looking back, I remember he was fairly outgoing & willing to make friends in kindergarten, but somewhere along the way, by the time he was in third grade, I could see him get more anxious around the other kids. When I asked him if he was making any friends each new year, he'd tell me no because he had nothing in common with them.
Granted, my son was always very sensitive and he liked things like art and science much more than sports and cars. Before that, in daycare, he had made really good friends with a little girl and the other kids teased him so much about them being boyfriend/girlfriend that he didn't want to be overly close to the girls either.
About that time, a new kid moved here and they became really close until after they graduated, and he picked up one more close friend in high school, so I didn't worry about it too much.
I might be making too much of one thing in my mind, but when he was still young enough to be in a stroller, I was shopping in Penney's in the clothes section, so he was surrounded by tall racks of clothes. A man came through and surprised him because he couldn't see him until the last minute, and it scared him to death.
So, strange people - or even people he knows but isn't comfortable with - has always been a problem for him.