The basic roots of cancel culture were not a bad thing. It was good when we started paying attention to how words and deeds affected others. Telling people to change their shitty behavior was not inherently problematic.
I think the problem it has become stems from the fact that online its easy to find a clique for anything. Whatever trait brings people together exists outside the larger context of life when online. You can have whole groups of acquaintances you only discuss that one thing with (fandoms are a good example of a group of people bonding over a singular thing, discussing the same topic for most of their interactions)
To people lacking a sense of community otherwise, to people lacking a strong established sense of self, its really easy to get sucked in. That group makes you feel good and before long that one thing, whether it's a fandom or a social justice issue or whatever, becomes a Focus of their personality. That issue starts to exist outside of context.
It becomes a drive to seek out whatever seems cancel-worthy and shut it down, regardless of context, regardless of the level of harm specific incident may be doing. One single wrong word makes someone cancel-worthy because people get hyperfocused on the Thing, whatever it is, and dont look at the person.
(Minor personal example, several months ago a some people tried to Cancel me on tumblr because while discussing trans issues i had a brain fart and said "cis-sexual" instead of cis-gender. And it was absolutely impossible to convince them i actually did know what i was talking about and was NOT an ignorant transphobe... despite the fact that i was literally dating a trans persom at the time. And like, if they paid any attention to who i am as a person at all, it would have been obvious i support any persons gender expression (or rejection of gender or whatever!). But i phrased one thing awkwardly and so needed to be punished because i was at best a bad ally and at worst a TERF)