From everything I've observed, the absolute worst thing you can do is apologize to the people attempting to cancel you. It's just pouring gasoline on the fire.
These people will never say "oh, you learned from your mistakes, I guess I'll back off". Most of them don't really care about the truth, they care about signaling. So an apology only vindicates them.
As far as I can tell, the thing to always keep in mind is if you wait a few days these things always pass pretty quickly. The internet has a very short attention span. As long as you never give those people a confirmation that you did something you regret, you're much better off in the future.
Of course you should privately apologize and make amends for things you've done wrong; but those things are always more effective privately and personally done anyway.