How to control links from outside that sabotage the website

I’m wondering how to properly manage this problem because recently some people are intentionally playing bad things by injecting dirty links and destroying my website.

Moderation.

If users are allowed to post links, they should already be disavowed (as they are on this site) so that zero benefit is gained by posting them, and moderation will be required to remove them.

If the links are coming from a common source you may be able to filter it; otherwise your options are moderation or prohibit users from posting links.