you've never had to do that because you're not a celebrity with a public reputation to maintain.
if you're some random private citizen then the worst thing about an ex flipping their shit at you like this is some mild embarrassment for you. it's not gonna get you fired from your job, it's not gonna ruin your business, it likely won't even gain much traction outside of her own immediate circle of friends, and even then it'll most likely blow over within a few weeks or months. also, depending on the person involved, if she has a history of being an insane retard bitch then she won't be taken very seriously to begin with.
in the public sphere on the internet, this is all different. accusations can quickly become decoupled from the accuser, the public will not know anything about the person making these claims and will just assume they're probably reasonable, loads of people online are also just drama hounds who will amplify and push anything if they think it has the potential to generate entertaining content, others will jump in purely based on political associations, and of course almost every public figure has anti-fans and haters who just want to fuck with them for shits and giggles. it's all around chaotic, unpredictable, and prone to having false narratives spiral out of control very fast. if this space is where you make a living, then preparing yourself and taking precautionary measures against potential character assassination attempts like this is a smart choice.