Well, yes, candidates always lose because people don't vote for them. If you run for office you need people to want to vote for you.
Most Democrat insiders, including Obama, thought Harris was crap, had never been VP material, and couldn't win. Despite his berating male voters over misogyny for not liking her, which looks a bit shitty now given that he didn't think she was any good either.
I don't think misogyny is the issue with either of them. Hillary wasn't ever personally popular, even when Bill was president, she always rubbed people the wrong way, and she was just not a natural or warm communicator. I can't really think of a president from Reagan on who was as wooden and unnatural as either Harris or Clinton, which arguably is an unfair requirement, but it's a significant factor in how people respond. (Trump is a deeply weird communicator, but I'd never call him staid or unnatural.)
Hilary also ran a disastrous campaign, full of missteps like completely ignoring the fly-over states - against advice. The Harris campaign was much better run, but she had other baggage - she was associated with Biden for one thing and there was a perception that she was involved in covering up his health problems, she was associated especially with some of the failures of Biden's administration (or, if you like, things the public saw as failures.) And both Harris and Hilary were very associated with the establishment at times when the American public wanted something different - Trump, and Obama (in his first campaign), in contrast, were both perceived as being outside the establishment and that was an advantage.
If Dolly Parton ran for president today, I think she's probably get a higher % of the vote than anyone ever. For whatever reason, the Democrats seem to pick women who are unlikely to win.