I'm not so sure Democrats want to prevent him from running. Yes, I think he'd crush Biden in a rematch, especially with things going so badly right now. And it's likely to stay that way or get worse, since the fed really should keep raising interest rates to get inflation under control. That is the right long-term strategy, but you can ask Jimmy Carter what it does to re-election odds.
But the GOP has been trying to find ways to either marginalize Trump or convince him to step aside, and I think the party would face a potentially ruinous division if they can't. Or, if he steps aside but makes a lot of angry noise about it, it could also hurt the eventual GOP candidate. You could end up with the reverse of 2016. Dems were probably delighted that Trump was running back then, only to learn to their horror that he won the election.
I don't expect Biden to run (or to be allowed to run) in 2024. I also do not expect Kamala Harris to be the nominee, unless the Dems want to lose. I expect them to force both of them off the national stage and try to find someone who can win a race against a GOP turnout that is low or split due to anger over Trump, one way or another. If things are going as bad as they are now, it would likely be their only hope.