The Democratic National Convention hasn’t happened yet, which is where the party selects their candidate. Generally the selected candidate at the DNC is the winner of the individual state primaries. So he could step down and the party simply picks someone else at the convention.
I’m about done with Character Limit, it’s about Musk’s takeover of Twitter. It’s super fascinating, an absolute page-turner. If that whole shitshow remotely piques your interest I’d recommend it.