There is an ongoing issue with vmmem eating up all your memory in windows 10 2004. There is a workaround.
Workaround: Create aApostolos
%UserProfile%\.wslconfigfile in Windows and use it to limit memory assigned to WSL2 VM.
Below is an example of .wslconfig
[wsl2] memory=6GB swap=0 localhostForwarding=true