There's no definite one way to go, though I prefer to have characters know each other. Here's some options and what you get of it:
How well does this work? Well that depends on whether your players are all willing to buy into "a group of strangers will work together as a team in life and death situations". It's a trope that makes up a lot of 80s action-adventure films and pulp stories.
On the other hand, when you hear about groups that devolve into thieves stealing from people and paladins going fanatical on their teammates, it's when the group DOESN'T buy into that idea.
Heard of each other
"Ah, you're the Red Sword, I know of you!" etc. Not quite as bad as total strangers, but again, it depends on the group of players deciding to make their characters align in interest - the difference here is that with some assumed character knowledge about the other characters, you have more reason to trust them or want to work with them.
Work for a similar faction/cause
The characters all work for a similar group or cause, and so they've definitely heard of each other and have social reason to work together. This is where most games that rely on mission-based play do well in coordinating a group.
Each character knows either 1 or 2 of the other characters personally. So, everyone in the group knows at least one of the others, but not everyone knows each other personally. This still has the potential pitfall of conflict, but usually works better for bringing characters together without too much pretense.
An established group that has worked together before and at least a decent working relationship with each other. You can either have players state what that is to each other. It could be relatively new ("We banded together 2 months ago, so we're still figuring each other out, but we know we can depend on each other with our lives") or it could be after much time ("10 years of adventuring off and on together") and so on.
If the expectation is for the party to work together (and in most D&D, it is) let the players know and figure out what feels good for them with that understanding in mind.