My middle child was an intensely shy child who wouldn’t speak to many people until she’d known them for a long time. (In some cases it was years before she was comfortable which included close relatives.)
We didn’t push it and definitely not to say hello initially. However, I wouldn’t speak for her if it was something like needing a drink when out. We’d work out what she needed to say, practice and then ask together. Then gradually moved to getting the attention of the person together, her asking on her own and so on until she felt able (but not necessarily confident) to do it on her own.
I encouraged having friends over, going to the park after school, etc. so she could interact with her friends whilst I was around. Away from the eyes of adults or large groups she was perfectly chatty with her peers.
At home with just immediate family she didn’t shut up which many people found hard to believe!
On the flip side I’ve come across parents who’ve tried to force their child to speak, go on at them and talk openly in front of them about their (the parent) frustration with said child. Which, in my personal experience, has exacerbated and compounded the problem leading to further issues down the line. It draws attention to them which they emphatically don’t want!
DD is now 19 and can hold her own but will never be an extrovert. She was working in retail before Covid which had made a massive difference. Being furloughed and, consequently made redundant, has set her back, but by how much I don’t know.
Support, communication and lots of reassurance were key for us.
Happy to talk more if wanted.