At this point, it would probably depend on what the prevailing narrative is about why Democrats lost. It would almost certainly be a very ugly primary, with the current divide in the Democratic Party getting more severe and reaching a boiling point.
The three reasons why I see a possible loss in is 2020 is that-
1) Biden wasn't liberal enough and was a very weak candidate. He was too conservative, too old, and had an awkward style that made people uncomfortable the way even more aggressive styles didn't.(Especially if Democrats keeps the house) Depending on how the economy is in 2024, we should probably go with Buttigieg if the economy is "normal" again, or AOC if it is struggling.
2) The Democratic Brand is toxic. A lot of people were saying this out of 2004. (Especially if Democrats lose the house) That's how a lot of moderates and conservatives got into office. We will be back to Howard Dean saying we need to win voters of people who have confederate flags on their pick up trucks. I would say to double down and wait for people to listen but after this year, I don't know when that would ever be. We could always try someone like Gabbard in 2024. She resonates a lot more with the base than Biden would and is pretty Trumpish (many I don't like) but she is strong on domestic policy. She could be a "Bill Clinton" like character. That is, someone the national democrats would never trust until it was apparent they weren't trusted by the electorate. (A Trumpy narrative) Someone who could run on a "liberalish" platform that would be seen as too liberal and too moderate at the same time by the base but also someone who could wedge enough votes back. It wouldn't necessarily have to be Gabbard and might even be someone much stranger or someone not in politics right now.
It would just have to be someone who
1) Under the age of 50, preferably under the age of 45
2) Someone who is either not a white straight male or an "outsider"
3) Someone who is going to push for substantial Medicare expansion (MMA, Medicare at 50, or an affordable buy in for Medicare or Medicaid)
4) Someone who will aggressively protect or restore the judiciary and if it's already too late, someone who will find a way to "chip away" at the new power of states in question.
5) Most importantly, someone who is still willing to fight the Democratic base on issues that matter to poor and near-poor voters of all backgrounds whether its trade, or immigration.
3) All the corruption of Trump administration can and does "trickle down" when "they" need it to. The economy quickly recovered making Trump look like this great president on election day. Who knows how to get out of this. Basically, we've reached a point where democracy doesn't function because the banks and large estates are so powerful that they can "shut down" or "open" the economy the bribe, reward, and punish voters.