“The most important thing to remember when encountering a browser window displaying a tech-support scam message is to not panic and to never call the phone numbers displayed. When all else fails, the browsers can almost always be unlocked by using the Windows Task Manager (control-alt-delete) or the macOS Force Quit feature (Apple menu).”
Close the browser, restart the computer, and see what happens. Most times, it’s just a fake window that popped up on an infected website, and once you move away from it, it’s gone. Even if it’s not, don’t call the number you see, and don’t give out any credit card information. Find the actual number for the company you need to talk to, or a local tech.