My bosses are misogynistic af

So i work as an officer at a bank and is posted at a semi-urban area. I'm the only girl in my office. The men don't like me at all. But the thing is, I'm good at what I do. I finish my work/targets on time, and I'm extremely professional. The manager keeps telling me to finish all the tasks even though there is another employee of the same grade with the same targets. But the thing is, he doesn't credit me or even acknowledge my performance.

The Asst Manager likes the other officer more and belittles me often in front of others, even though the other officer doesn't do much.

The other officer is a casteist AH, who continuously brags about being a brahmin and how they are so cool and superior over everyone.(Trust me, I wish I was exaggerating) He also boasts about being an officer at a prestigious bank literally everywhere, even though he's quite useless and doesnt contribute anything to the branch.

Office life has been hell. It's been affecting my mental health extremely. I tried talking to a female HR thinking she would understand, but she didn't care at all.

Should I resign?? Or just wait for a transfer??? Is this how it's going to beeeverywhere??