Either there’s something much bigger running or the hardware is defective. I used an 8GB M1 with VSC, Podman, Slack, etc. for a few years during the pandemic and it was fine. Chrome is a notorious memory hog but even then it was okay so I’d review the installed extensions if it’s that high.