If you look at comments on the internet, you may see references saying that Apple does make cold calls. That was once true on a limited basis. Those comments are now badly out of date by 10-15 years or more, and should be ignored. Apple does not cold-call today.
Background: In the early days of AppleCare extended warranty, Apple would cold-call you about a month or so before your free one-year warranty expired. My recollection is that the last such AppleCare call we received was in early 2007. These ONLY tried to sell AppleCare, not to say you had a problem with your computer
Any cold call that says your computer is compromised is a SCAM. No one—not even the minor deities who live on Mount Cupertino—can "see" what is on your computer unless you give specific one-time permission for remote access.
Anyway, that is one end-user's experience. I doubt any Apple support person you ask today has been there long enough to remember the old AppleCare cold calls. But we greybeards in these forums do.