That's misinformation, though.
No, SCOTUS didn't give Trump presidential immunity. Quite the opposite. They ordered that the lower courts continue Trump's prosecution.
The Court merely said that presidents, Biden or Trump, aren't allowed to prosecute where there isn't a valid charge. It wasn't that crazy of a ruling.
As for the midterms, it's up to states to conduct their elections, so it's not up to Trump.