Sounds a little bit like what happened to me earlier this year.
First time I got a call from someone claiming to be from Microsoft, saying that they had detected (magically lol) that my computer wasn't running as well as it could & was infected. I told them that I knew it was a scam & to p!ss off.
Second time was after I'd just moved house & had been temporarily given another phone number - same kind of spiel about infected computer. This time I asked them how MS knew my computer was infected since I used a Mac. They hung up on me