It's using your swap heavily, so I'd say you're short on memory. The lags are likely when it's using the swap. I'd suggest getting more RAM. I'd further suggest getting a USB stick, plugging it in, and setting it up as a second swap drive. I'd further suggest you install nohang:
sudo apt search nohang
nohang/focal,focal,now 0.2.0-1~oibaf~f all [installed]
sophisticated low memory handler for Linux
sudo add-apt-repository ppa:oibaf/test
sudo apt update
sudo apt install nohang
sudo systemctl enable --now nohang-desktop.service
I know nowadays that the common knowledge is that no swap is needed, or only a 2 GB swap is needed... I still stick to 2x RAM as a minimum. I have 4x, across two drives.
free
total used free shared buff/cache available
Mem: 11585624 5396996 5439080 47168 749548 5819332
Swap: 50331640 0 50331640
This will increase the speed of the swap a bit: