D&D has a problem with iteration time, that is, the amount of time a player spends trying to get back into play after his character buys the farm. There are some ways the game handles it by default, mostly in the form of resurrection or healing magic, but sometimes this isn't enough. Therefore, I ask the players to decide how they want to handle it on a campaign-to-campaign basis with my only request being that, whatever they choose, it must get the player back into the game as quickly as possible. I do not want players to be put out of play for any longer than they want to be. This ain't Monopoly.
Generally, it ends up being that players create backup characters that they want to play should their primary character die. We're sure to work in "trap doors" in the fiction that introduce these characters prior to them ever being needed so that when it's time for them to come into play the transition is quick and smooth.
Yeah around the next corner is a prisoner shackled to the wall....
The plus side of things in 5e (with the exception of spells) it can be pretty quick to make a character. They also don't need all their magical gear straight away to be useful.