It sounds like you have a stuck pop-up window on your Mac that you can’t close, or a fake virus warning has taken over your screen.
If you encounter a pop-up window that seems suspicious or fake, do not interact with it. Instead: pop up window blocked mac
By default, Macs have a built-in feature that blocks pop-up windows to prevent unwanted interruptions and potential security threats. This feature is part of the Safari browser's security settings. When a pop-up window is blocked, you'll see a notification message indicating that the pop-up window has been blocked. It sounds like you have a stuck pop-up