> Which will shorten the lifespan of the SSD
Technically true, but not enough for you to notice.
Modern SSDs have drive write lifetimes in the high hundreds of TB of writes.
If you had 128GB of memory in your laptop, writing that down to disk isn't going to consume much of that write lifetime.