First, there is no reason to ever install or run any 3rd party "cleaning", "optimizing", "speed-up", anti-virus, VPN or security apps on your Mac. This documents describe what you need to know and do in order to protect your Mac: Effective defenses against malware and other threats - Apple Community and Recognize and avoid phishing messages, phony support calls, and other scams - Apple Support.
There are no known viruses, i.e. self propagating, for Macs. There are, however, adware and malware which require the user to install although unwittingly most of the time thru sneaky links, etc.
Anti Virus developers try to group all types as viruses into their ad campaigns of fear. They do a poor job of the detecting and isolating the adware and malware. Since there are no viruses these apps use up a lot of system resources searching for what is non-existent and adversely affect system and app performance.
There is one app, Malwarebytes, which was developed by a long time contributor to these forums and a highly respected member of the computer security community, that is designed solely to seek out adware and known malware and remove it. The free version is more than adequate for most users.
It sounds as if you might have clicked on a link that installed some adware. Run the free version of Malwarebytes and see if there's anything it catches.
If that fails to detect untying download and run Etrecheck. Copy and paste the results into your reply. Etrecheck is a diagnostic tool that was developed by one of the most respected users here in the ASC and recommended by Apple Support to provide a snapshot of the system and help identify the more obvious culprits that can adversely affect a Mac's performance.
Copy the report

and use the Additional Text button to paste the report in your reply.

Then we can evaluate the report to see if we can determine the cause of the problem.
