If they feel that the environment is safe and friendly - they will speak up. I noticed that such environment is created when people have discussions on personal level.
The thing that I see almost always works is going to lunch together. People get closer as they start discussing personal stuff too, which makes them more comfortable. Though frequently the team still splits into sub-groups - each sub-group goes to lunch separately. Which may result in a tension between sub-groups. Of course this practice works only in office settings.
I also like to bring up non-work topics during meetings - maybe discuss some news, or tell some story, or share something personal. Hopefully make people laugh. This can work for remote meetings too.
During calls - ensure the team have their webcams on. People don't trust black rectangles and they usually assume the worst - that someone's angry or got offended; or when they tell a joke and there's no reaction - they'd assume people didn't find the joke funny. So next time they'll be afraid to tell jokes. Also this allows for more personal discussions as someone will have a pesky cat or a funny dog at the background and will bring this up. Though unfortunately a lot of people blur their background these days.
I know a company where they have a practice of a coffee-buddy. Once a week everyone (who agreed to participate) gets to have a call with a random colleague (who also agreed to participate) and they just have a 30min chat. Since the pair is chosen randomly there's a chance of those who don't usually communicate - to get closer. I see that it works for some people very well, but I don't know what happens when 2 shy people meet - it could be stressful for them. I wouldn't make this compulsory.
And I think the most important is to have positive colleagues. If there's a bully in the team - he'll make everyone uncomfortable. They're afraid to trigger that person and hence will not bring up some topics.