If you only have 8gb you're probably swapping a lot, depends on what you do with your PC.
Anyway, to set up zram the easiest way is to try this: https://github.com/systemd/zram-generator/tree/main Also, take a look at the zram page on the arch wiki, even if you're not using arch it's very well made: https://wiki.archlinux.org/title/Zram