Run a build with Task Manager (or whatever equivalent for whatever system you’re using) open, and have a look at disk/ram/cpu usage. I can almost guarantee you’re disk I/O bound right now, and moving it to SSD will very rapidly move you to CPU bound. I had a similar system to what you have (though 4th gen i7), where system and all programs were installed on a small SSD from that era, and when I came back to Unreal after a few years away, I had Unreal building on my terabyte HDDs.
First I grabbed a 1TB SSD (they’re relatively cheap these days, highly recommend the upgrade even if you aren’t going to go with any further upgrades) and that greatly improved compiler perf, leaving me CPU bound during compiles. A full engine rebuild went from 12 hours down to about 6. My next move was to a new i7-10700 with 3x the RAM and a NVMe SSD. My full engine rebuild time went down to 45 minutes.
A complete game build/package for my project took well over a full day on my old PC, and now takes about 6 hours (of course, i try to avoid ever having to do that, and let the ThreadRipper systems at the office do those)