Hi,
Thanks for reaching out and sharing the details. Can you confirm if the warning shows up as a pop-up in your browser or if it takes over the whole screen like a system alert?
From what you’ve described, it really sounds like a tech support scam. Microsoft will never lock your computer, tell you not to restart, or ask you to call a number. These messages are designed to scare you into contacting scammers who want your money or personal information.
The best thing to do is ignore the warning. Close the browser or app that’s showing it, and if it won’t close, press Ctrl + Shift + Esc to open Task Manager and end the browser process. Then restart your PC normally don’t worry about the message saying not to restart, it’s fake. After that, clear your browser cache and run a full antivirus scan to make sure nothing was installed. For extra protection, you can also run Microsoft Defender’s offline scan from Windows Security.
I hope this clears things up! If you need more help, just post back.
Best,
Edward