I could go a full analysis of all the various factors that led to Trump's narrow win in November, which shouldn't really have been the surprise that it was.
However, it's probably best to keep things fairly brief as others will have done far more than this. There are two main reasons for Harris losing.
Firstly, she was basically an unpopular incumbent in an economy many felt was performing poorly and so they voted for a change of government. Something happening in a good many countries at the moment. It is quite possible that if Trump mucks up the economy with his tariffs etc. that the Democrats will sweep back in come 2028.
Secondly, the left in general has become quite seriously out of touch with ordinary voters. Some frankly view anyone who would vote for Trump as beneath contempt, deserving of the pain that is about to come their way. They will not even associate with them socially, which means that they are rather unlikely to convert them or even present them with an alternative to the right-wing distortions that Elon Musk is happily amplifying right now. Also, they don't really look like "working class" people anymore. Who is the most working-class person in the government right now? Probably Angela Rayner.
Trumpism may collapse from its own internal contradictions, but the left needs to get its act together. It is no longer guaranteed the Latino vote or the working class vote; the black vote is better for them, but that could go with the right Republican candidate.
There is a decent chance, as two other politicians observed the other day - and it's happened in other countries with Thatcher and Merkel - that the first Madame President will be of the elephant persuasion rather than the donkey.