those of you that had a problem with chasing external validation: how did you fix it?

i have a need to be accepted by everybody, and often that need clashes with my principles, like i'll seek validation from people that i fundamentally don't respect, like gossiping low-class women and liberal beta men. i also have trouble with frame. for example, if i'm dealing with a feminist clique at work, at first i'll understand that they're just shitty people, but after a while i'll start doubting myself, whether i'm in the wrong.

personally i have no other solution than just keep on keeping on: stay away from bad people, don't fold and try to become their bitch, even at the cost of them shitting all over me, and maybe overtime i'll build tolerance to their toxicity. i also noticed lifting weights doesn't help. i wish there was some mental button that turned me into a narcissist who doesn't give a fuck what these people say. keep in mind, most people i deal with are ok and go about their business, but the shitty people make sure that they're the loudest and most impacting.