That might be because of background programs running. Not all programs play nice and hog up their space in memory. One thing that people could try is shutting down unnecessary services.
There are plenty of youtube video guides on how to do this. Also be mindful of any apps you may have running while playing Diablo 4. The idea here is to run the game with out stuff you really don’t need and see how it goes.