Avast Premium Security missed to protect my laptop

Recently, while watching Twitch, my computer froze and shut down with black error screen. Upon startup, all accounts were logged out, and the browser changed the tab and default search engine of browsers to Yandex. Furthermore, the system wouldn’t let me restore everything, and Avast couldn’t detect the malware.
Only with AdvCleaner,I was able to find and remove the virus disguised as a system file.
HKLM\System\CurrentControlSet\Services\EventLog\Application\SecurityService

I think developers should focus on improving the quality of the product rather than creating yet another useless feature that will be parasitically advertised.