You logged in here, so… very clearly the Apple ID is not locked.
There are an IMMENSE number of these scams, vast numbers of advertisements that lie, and worse. If you see the words “LOCKED” or “HACKED” or “VIRUS” in a message, or a countdown or time limit, or a “percentage hacked” in any mail, it’s likely a scam.
Some few of many ➡️ Recognize and avoid phishing messages, phony support calls, and other scams - Apple Support
If this is one of the common phishing scams and you followed the link and entered any sensitive data or entered your password, then you did get breached.
If you think your Apple ID has been compromised - Apple Support
If you “just” followed the link to a scammer’s site, then you’ll probably be targeted with more scams.