Avast is absolutely rubbish and a massive resource hog. It’s basically scare ware at this point, always trying to scare users into buying additional features.
Windows defender is great these days, I use it as my main antivirurs and do the occasional manual scan with malwarebytes.
What makes you say you can only use 4gb? It’s showing that’s how much is currently in use and 15.9gb is available should it be needed.