That email is a common scam.
Here’s a write-up on one variation of the scam:
https://krebsonsecurity.com/2018/07/sextortion-scam-uses-recipients-hacked-passwords/
I'll get the occasional mail message with an old password of mine akin to the message you received, which the miscreants have acquired from server breaches. They’ll make a few absurd claims, too. They can’t do what they claim, though you will want to avoid re-using passwords because these scams aren’t the only thing the miscreants will try with an old password.
Looooong thread about users getting lied to by pop-ups, which is another very common scam...
I got a popup that says “Your system is infected with (3) Viruses … - Apple Community
What you were reading in that mail or may (will?) have seen in the similar pop-ups was and is categorically, totally, completely, and utterly rubbish.
Recognize and avoid phishing messages, phony support calls, and other scams - Apple Support
Websites and scammers in general cannot scan your device, your Mac, your Windows system. Not without you having granted that access. Usually by loading whatever app they want you to load, or by giving them your credentials.
Scammers can cause you fear—or titillation, or disgust, or curiosity, or the self-doubt arising from gaslighting—to get you to act against your own interests.