Ultimately, Harris lost because her campaign refused to address the primary concerns that voters had. I'd say there were four: 1) The Economy; 2) The Border; 3) Crime; 4) Abortion/Reproductive rights. I list those in no particular order, as different demographics on both sides of the aisle weighed them differently. Nonetheless, these were the four big issues for voters. Harris addressed only one of them, abortion. The others, were hardly acknowledged. Instead, she took certain demographics for granted, or assumed enough "orange man bad" rhetoric would carry the day.
Here's a perfect example. Four years ago, Biden won the Latino vote by 11 points. Good. Not great, but solid. Trump just took the Latino vote by 29 points. That's a forty point switch in one term. How'd that happen? Well, Latino's listed the economy and the border as their top two issues. Turns out Mexican-Americans also want a secure border and less crime. And everyone who lived near the border could have told you that.
And what was Harris's policy on the border? I don't know. She never really put one together. She had solid lines at debates and tv appearances. But there was never a concrete promise of anything. And that won't work.
When voters tell you they have a problem, you have two options: 1) convince them it isn't a problem; or 2) offer a solution. If you just ignore it, they will gravitate to the guy who's offering a solution, or at least seems willing to listen. Even if that solution is dumb. Like Trump's mass deportation plan that would likely cost over $1 trillion. At least he's listening. At least he's addressing the issue.
And what was frustrating about the way Harris ran her campaign. These were all issues she could have fought and won on. The inflation trump campaigned on was largely caused by his own shit policies. But rather than point that out and offer a solution to the very real inflation, Harris chose to ignore it and just pretend inflation hadn't happened. I don't know why this tactic was taken. Maybe it was an overly cautious attempt to not give trump an opening. But the reality was it ceded the space to Trump to be the only one at least talking about a problem that voters had.
Harris still had a lot stacked against her anyway. Trump had years to establish a campaign and get on brand, etc.; while Harris had only a few months. Harris also failed to separate herself from Biden, which was a mistake given that the whole right wing media sphere had been torching him nonstop his whole term. She had to know she'd get saddled with his unpopularity if she couldn't carve out her on identity. Yet, whether out of loyalty or timidness, she never tried.
In short: She took on all the dirt from the Biden administration and failed to provide concrete views on issues important to voters. Those two things killed her.