A common trick to make readers sympathize with a character is to have them “pet the dog”. They do something tender or sacrificial that tugs on the reader’s heartstrings. This humanizes a character with distasteful faults.
I remember reading a friend’s story where one of the character’s who’s on the “evil” side of things treats a prisoner with dignity. It intrigued me because it made me want to like that character when everything else about the story told me not to like him.
But there’s a second trick writer’s use to make character’s sympathetic.
Not self-inflicted wounds per se. Too many of those can make a character annoying. But serious failure and real pain can make an otherwise unlikable character much more sympathetic.
I saw this recently in The Crimson Campaign, book 2 of The Powder Mage Trilogy, by Brian McClellan. I love his story world, but the first book was a hard read. The characters were too grim for me.
Aside from the inspector, I found it difficult to root for anyone. On multiple occasions I wanted the protagonists to fail since I found their actions equally as despicable as those they fought against.
But that changed in book two. By hurting the other two protagonists in the series and showing them making sacrificial decisions, I suddenly wanted them to win. And live to enjoy it.
Loki from the Marvel universe is a character like this. You desperately hope he takes a turn for good because he’s experienced so much pain. You want him to somehow overcome his bitterness and anger and arrive at a happy ending.
I’m not sure that’s Loki’s destiny, but my hope is that my characters, despite their faults, elicit the same kind of sympathy from my readers someday.