Firstly >> Suggest downloading from a Respected ASC Contributor the application Malwarebytes for Mac. It is free or paid for added features. Run the Application and it should remove the malware / adware. Once done, restart computer and test.
There are no known Windows-like Viruses in the wild that self replicate and affect macOS, because of the underling UNIX Foundation and Permission Limitation.
So having either of these two AntiVirus Softwares installed is useless
There are Malware-viruses and Adware-viruses that does affect macOS and are often times downloaded as part of an Application from Third Party UnTrusted Site and get installed along with the Application.
Secondly - Are there any AntiVirus, Disk Cleaner, Optimizers, Un-installers, etc installed which should be removed as per Developers Instructions. They are useless, unneeded, cause havoc and interfere with the normal operation of the OS and may even Corrupt the OS requiring a Reinstallation. The Built-in Security of Big Sur is all that is required.
Thirdly - The Age of this computer will Govern what newer version of macOS it will Qualify to install. Use About this Mac from the Apple Icon on Desktop - the required Information will be there.
With the above information in-hand - follow this How to get old versions of macOS and verify what version this computer Qualifies to install. For Best results use Safari to commence the download as Others may not work.
Safari will open a redirect and open the Apple Store were the download can commence
Make Time Machine Backup is very useful and can be used to Revert to Previous Working macOS
Notation - Mojave is the Last version to support 32 bit applications / extensions and Drivers. Catalina & Big Sur supports only 64 bit and there is no workaround.
Suggest using Go64 to find 32 bit application before attempting the upGrade. Some or many of the Application already installed may required update or upGrades to 64 Bit Versions.