We’ve all had those issues - You either get a new player into an existing campaign or a character dies (with no hope of retrieval - outside of a comic book plot) and needs to be replaced. Assuming that you’re not running a campaign with multiple characters for each player (and most of us aren’t) - You need to introduce a new player into an existing party.
I’m funny - I don’t like to rely on people I don’t know to watch my back when someone might be trying to put a knife into it. As an adventurer, I would only want to go out on missions with people I generally trust. So I hate the concept of: Bob rolled a new mage and he’s going to start with the party tonight. I don’t care if Bob’s character is a starter character or somehow appeared fully formed with experience and magic items. Why would I trust this person in dangerous situations?
So I have a method I’ve started using. When a player has a new character to insert into an existing campaign, I give the player (and the character) knowledge about the next mission that no other character would have. Let me explain before I give an example. If the character knows things - maybe she is the one who actually introduces the mission to the party or he is the woodsman who has lived in this area his whole life and knows how to sneak in through the back entrance - then that character becomes valuable. So valuable, that the party needs to bring them along. By forcing the party to bring the new character, you are giving the party a chance to get to know this character, both in game and amongst the players. Maybe the character worships the same god(s) as one of the other players and is therefore easily befriended. Maybe the character is identical to another in the party and therefore kind of worthless. It’s a trial run to see if it works. If it doesn’t (like if the character is a backstabbing bitch and the rest of the party is the fantasy Red Cross), then tell the player they need something that fits better. Better that then trying to endure all the blatantly stupid gaps in the story that we all know are going to lead to the party fighting each other.
Examples: Easiest one - The new character is the quest giver and needs to come along for some reason. The issue here is explaining why it will later be OK for the character to join the party full time. The character is the only one in the city who can read the language written throughout the mission site. The character is the only one to have survived when the castle was overrun and is now the only one who knows his/her way around. Some part of the mission requires the new character to get past it - like a ghost who is their ancestor needs to open a portal and won’t do it for non-relatives. The gods demand that the new character go because they plan to reward him with some magical item that will help him bridge the gap between his lack of experience and the party’s higher “level”. (OK, I really hate that one. It’s crony capitalism.) Lastly - Some known barrier requires someone with this new character’s skill - acrobatics, tracking, flight, shape shifting, extremely light weight or small size, etc. In order to get where they need to be, they need this expert, and if they work out, they can stay. Just don’t let extremely powerful adventurers meet each other in a bar and decide to go off risking their lives and sharing (politely) treasures. I mean, come on!