Maybe, maybe not. There are many things that can make compilation slow.
How much RAM do you have? How fast is your CPU? If you’re limited on RAM or CPU, the disk doesn’t matter as much.
That being said, if you’re using Visual Studio, and building C++ changes, then, yes, it’s very likely the disk speed does matter.
It’s reasonable affordable and easy to replace a main SSD with something bigger these days, as long as you can have both disks plugged in at once to “clone” the old one onto the new one. Most disks come with software to do it (if you buy “retail” packages,) or you can boot Linux from a USB stick and use something like “dd” to do it (assuming you’re Linux-savvy – if not, then that might be a way to lose all your data instead
)
Definitely a worthy upgrade, if you’re thinking about an early Christmas present for yourself!