You have a few options: upgrade your RAM, switch to a lighter OS like Linux, or tweak your system settings to reduce memory usage.
Consider upgrading both RAM and your SSD. Check their read and write speeds as these also impact performance.
If upgrading your RAM doesn’t solve the lag, it could be that your CPU is the bottleneck. I have a similar setup, and even with an SSD and more RAM, the CPU struggles with basic tasks.