First, start your Mac in "Safe Mode": How to use safe mode on your Mac - Apple Support. Starting in Safe Mode takes longer than usual so let it finish.
While in that mode, drag all the files in those three folders to the Trash except those with the following in their names:
Apple
ClamXAV
Docker
Google
Microsoft
OpenVPN (but please read the Note later)
Oracle
Quickbooks
Teamviewer
Zoom
When you are finished those few are the only files that will remain in those folders.
Then, restart your Mac normally, and test.

Note: Regarding OpenVPN, I recommend you don't use such things, but at least familiarize yourself with what they claim vs. what they can actually accomplish.

You can see for yourself that neither Avast nor ClamXAV did anything to prevent you from installing malware. I recommend you uninstall both of them. In the event you thought those products were free, think again.
All Mac "anti-virus" products are categorically useless but "Avast" deserves special recognition as a particularly bad actor:
https://www.ftc.gov/news-events/news/press-releases/2024/06/ftc-finalizes-order-avast-banning-it-selling-or-licensing-web-browsing-data-advertising-requiring-it
Rule 1 of Macs is don't install junk.
The same can be said for Google. If you want to install Google on your Mac, just be aware it comes at a price as well — not only in terms of the personal information they constantly harvest and sell, but from the performance degradation its constantly running "helpers" are inflicting on your Mac. Google won't care if it causes a Mac to perform poorly, they are just interested in selling you, as their product. What's it like to be sold?