This probably dates me, but I was trained as a kid that it was rude not to introduce yourself to a new person, particularly a new person at your church, school, or other regular event. My gregarious mom and reserved dad both went out of their way to say something, although I could tell my dad would have been content to watch from the sidelines.
Perhaps this was East Coast manners, but now that I live in coastal California, most kids don't seem to hear the message that they should welcome strangers. And such is the longevity of our homeschool group that it's not that often they are called to go out of their way to do so. For better or worse, they've grown up knowing most of the people around them. The adults seem to have various levels of social initiative; some automatically reach out, while others only remember on their better days.
I realize some kids are shy or reserved, but training still matters. One system that helped my reserved oldest was that she had to ask a vendor herself for a sample, toy, or candy. I told her it didn't matter to me whether she got the toy or not, so she could decide for herself whether to approach the register (with me standing a few feet back) and talk to the person behind the counter, and sometimes she would decide it was worth it. Over time she watched younger bolder siblings and decided to try more. She's still not outgoing, but can handle these situations.
A mom who raised the most polite people I know used to offer them a dollar for every person they introduced themselves to at social events. The offer was only there for a few years but made a lasting impact, and when I remember to offer a sociability reward to my kids, they are more likely to take a minute and greet someone.
Another mom, who never. bought her kids candy, would allow them to pick out something at the drug store after they visited the nursing. home - IF they had circled the room shaking hands, smiling, and saying something pleasant such as "Have. a nice day!" or "Happy Thanksgiving!" I still feel awkward in nursing homes and this would have benefited me to practice as a child.
Many adults feel more lonely and awkward than we know. It's easy for us to assume that they can go up and meet people if they want to, but inside they may be just as reluctant as my 8-year-old at the candy counter. They are waiting to be welcomed by someone with more practice making the first move. Most kids can learn to be that person.