Yes, her being a woman is a piece of the pie.
Also, being a person of color played a role on top of the Democrats typically being shoehorned as being the party of Minorities, LGBT, etc, which also affected the election. People keep bringing up, “Well, what about Obama?” without taking into consideration that socially, the moral and political climate of America was much different back in '08 and '12. Shyt, there's no guarantee that Obama would have fared well in this current era (2020-2024) if he were running due to the climate being much more harsh.
Racial tension, sexism, and anti-gay/LGBT rhetoric, among other things, are much higher and more apparent now than it was during the Obama years, yes these were present back then, but they reached a new high in 2016 and peaked even more post-Covid, pretty much throughout Biden's term up till now. If Kamala was running in '08 or '12 against the likes of McCain or Romney, I'm very positive she would've fared much better, possibly even winning because the climate was much different than it is in '24.
That's not to say she didn't have flaws, but every presidential candidate in history has had some of their own; there's never been a completely perfect candidate.
Kamala losing the election has less to do with policies/politics and more to do with rhetoric, personal biases, and disdain for certain segments of society. That's what fueled Trump's victory in '16, and it's the same this go around: 7/10 people aren't voting for Trump solely because of policies, economy, etc, and anyone who sprouts that is just being disingenuous.
America is a racist and sexist country, when it wants to be especially towards certain groups of people; I don't understand why people like to be disingenuous and bullshyt around like it's not, obviously not every single citizen is a racist or sexist, but there's a large population that is, whether overt or covert, it shows in the polls.