Electoral votes don't tell the full story. You can win every electoral vote in the country if you win every state by 1 vote.
Inflation was blamed on Dems. It didn't matter if they caused it or not, they got the blame. I will agree that illegal immigration might have had a lot to do with it too, although the vast majority of people actually feel the effects of inflation and very little effects of illegal immigration.
No one really cares about DEI, or "lawfare" or any of that right wing media crap.