This old thread saved me. Thank you very much for the suggestion about uninstalling Avast Cleanup!
Soon after I started using Avast Cleanup Premium and 'optimized' everything including putting all programs to sleep, my Firefox browser stopped working properly. I could no longer open links in new tabs (every new tab remained blank and the page loading indicator didn't move at all). Then, when I tried exiting Firefox, all the Firefox processes in the task manager remained active for a whole minute (normally when I exit the browser, the processes disappear almost immediately).
The weird thing is, Firefox wasn't even in the list of programs that were put to sleep by Avast. I 'woke up' all the programs there but that didn't fix it. Only after I removed Avast Cleanup, my browser was back to normal.
I didn't even get a chance to use other programs before this happened, so I don't know if anything else was affected the same way.
Anyway, I'm glad I found this thread. Considering that people were having similar issues with Avast Cleanup from 2017, and it's still breaking things in 2022, I doubt that I will ever try it again.