What could Trump have done to improve his odds of wining reelection, and why didn't he?
Primarily, he shouldn't have publicly denigrated the virus, downplayed it, politicized it, and mocked restrictions due to it. The majority of the country thinks the virus is an extremely serious threat, and letting that become a referendum issue at the polls cost him the election. He should've spoken about the seriousness, need for testing, containment, mitigation, ect at every opportunity, instead of joking about how it's not so serious and the biggest problem was too much testing.
The reason he didn't do this is that he's an honest (albeit completely insane) man, who truly believes in everything he says, and truly believes the majority of the country agrees with him. He is incapable of changing his persona and pushing an agenda he doesn't believe in, just because polling would indicate such a move to be prudent (and he really believes that all polling is false, rigged, and a product of media spin and fabrication). A textbook clinical narcissist such as himself is incapable of seeing another person's position and acting accordingly, even if not doing so can cost him the presidency.
That being said, I'd still vote for him. Insane or not, he's still better than the left (and was probably Israel's biggest supporter of all USA presidents in history).