I'm suspicious of that message.
I wonder if it might be a Web notification from some third party – a third party that is using a copy of an Apple icon to make you think that the notification is "trustworthy" and that you should click on it, and do whatever you're told. Like entering your Apple ID password into a phishing Web site so that criminals can scam you!
My impression from reading other posts in this forum is that recent versions of macOS / Safari provide support for Web notifications, that in some versions the Web site can supply its own icon, and that there have been problems with spam/scam sites abusing notifications (just as spammers/scammers abuse the phone system and e-mail).