Buffy is a show about female empowerment and Xander is the token male sidekick. If you look at other shows like Xena or Relic Hunter, there is always at least one of the male cast who is deliberately made to look bad so the women look better. Xander (or any other male) is not born knowing what he needs to know. As one movie star said to a screenwriter, "I don't want to be the man who learns, I want to be the man who knows" and the reason is, no one wants to see how this happens. Adolescence is when some of this happens. The rest may never happen.
Xander is a normal boy growing up in an abusive home in the complete absence of a healthy role model. The fact that he became a respected contractor may have taken place in "The Replacement" but it stuck and he did not repeat the toxic patterns of his family.
I think that Xander gets hated for 2 reasons.
1/ He's the load without any supernatural powers and so when you're a kid he's going to seem boring. Which kid is going to want a Xander action figure or pretend to be him on the playground?
2/ He's a dick to the fan favourite Spike and also to Angel popular, so lots of fans turn against him for that. Okay Giles is a bit of a dick to Spike at times, but he has more bonding moments with him than Xander, as does Willow and Dawn and Anya etc. Xander is Spike's biggest critic and a lot of people never forgave him for that.
These were the reasons I disliked him for years.
The incel criticisms, nice guy stuff, is a lot of wank LOL that some people use to either bring their modern hang ups into a 90s show or to justify their hatred and make him persona non grata. (Or again maybe they are conflicting Nick Brendon's own issues with women caused by his unfortunate mental health problems and addictions. He was a tragic character, not saying that excuses it of course, but I do feel the context should be known.)
Xander does not even remotely fit the bill for a nice guy. He has a crush when he is what, 15 on his best friend, tells her, makes ONE snarky remark when she doesn't feel the same way that he instantly apologises for and then makes fun of himself for. That's it! He later selflessly risks his life that day and goes to the guy she loves instead for help. He also moves on in the next season with Cordelia, and by season 3 he is completely over Buffy.
His hatred for Angel isn't out of jealousy. He NEVER tries to kill Angel or frame him or anything when he has a soul. Indeed he gets OUTRAGED when Kendra says they should kill him. His kick his ass line is dodgy, but again for people to pretend it's just jealous is ridiculous. It isn't at all at that point. He is with Cordelia and he clearly wants revenge on Angelus for Jenny and Giles.
After that he is nothing but a supportive friend to Buffy and Willow and Tara. He NEVER gets insecure or tries to attack them or guilt any of them into liking him.
If anything if you want to drag modern, tedious, culture war terms into it, Xander is a simp or a white knight LOL. This is a guy who like we said gives Spike constant crap, whilst sleeping with Anya? The latter is a monster with or without a soul. She killed babies when she was a human (as she turned her boyfriend into a baby eating monster and set him loose in the local community.) She also condemned people to an eternity of torture in some cases, and her wishes often killed the recipient if Cordelia's is anything to go by. "If Cordelia's wish was for a long life she should get her money back."
Plus she CHOSE to be a demon twice and only showed a tiny bit of regret at the end. Spike in contrast was turned against his will, killed to feed (even if he was still sadistic, it wasn't total and complete sadism like Anya) and willingly got a soul when he was a demon. Also even Angel when he got a soul was so crushed and horrified after 100 years of bloodshed, as opposed to 1000 like Anya, he shunned the world and lived on the streets for years because he felt that's what he deserved. Anya in contrast missed being evil when she got her soul back and went on happily with no guilt and felt she deserved a happy marriage.
Ironically far from being a misogynist Xander shows the worst double standards to the male characters I've ever seen LOL.
Hilariously the dorky male sidekick you mention IS a common trope and there are more dated versions than Xander who don't get anything like the shit he gets from their respective fandoms. In fact most of them are popular! Guys like them as they show uncool guys hanging around with and sometimes winning hot babes, and women like them because they are sweet, dorky little puppy dog characters.
Look at Joxer from Xena? He is generally a popular character and if he is disliked, it's not because people think he's creepy, they just think his comedy is too broad.
Still he spies on naked Amazons having a shower, constantly guilts Gabrielle for not liking him, follows both women around when they don't like him at first (though they come to love him.) He even briefly takes advantage of a amnesiac Gabrielle before reconsidering. Hardly anybody cares about these moments and again generally love Joxer as a good and loyal friend to the two leads and find him cute.
Fry from Futurama meanwhile who is universally beloved and who most people, including even the wiki think Leela is cold and horrible to for not getting off with him right away. Does WAY more creepy shit. To start with, unlike Xander, he doesn't get over Leela for years. He cheers when her wedding goes tits up simply because he can move in on her, he constantly asks her why she doesn't like him, invites her into creepy rooms he's done up to be sexy where he can seduce her, pretends to be someone else as Lars to seduce her, creates pictures of them together etc.
Again I'm not saying I dislike those characters. Obviously I overlook those bits and focus on the sweet, touching moments like The Sting. However yeah there is a lot more creepy stuff in those characters than poor old Xander and nobody cares?
Only time Xander did something creepy was in trying to use the love spell on Cordelia, but even then it wasn't to win her back. It was just a spiteful attempt to get back on her as he could then dump her and not be such a joke at his school (to be fair she dumped him on valentine's day for shallow reasons.)
Willow actually did that shit for real with Tara!
Again to me it's just Xander isn't a watcher, a Slayer, a witch, a vampire etc, and he gave the fan favourite a lot of grief. That's it.