Can defender detect bad domain or link and malware?

I am trying to figure out how this script appears on my website files <link rel='dens-prefetch' href='//coinhive.com' /> will Defender plugin able to detect this kind of issue? coinhive is known to be a Crypto Miner. Am I overthinking this ? should I just ignore it? I have googled about coinhive, I see nothing but bad reviews. Will Defender plugin able to detect this kind of issue? Is this considered an issue? same question referring to the attached pic. Would Defender plugin be able to detect this ? Few days back my site was compromised and had some scripting that would redirect my users to other websites