How to determine why my Mac temporarily freezes? Every couple days, my Mac will simply freeze for several seconds to a few minutes.  Any audio stops playing, and the mouse stops responding.  Then it's back to normal.  The 99.9% of the time it's behaving normally, it's just as snappy as the day I bought it.

How can I figure out what is causing this?

My Mac is getting old so I accept that it could simply be normal (if excessive) lag, but I don't know what aspect of my system I would need to upgrade to mitigate or minimize this.  More RAM, faster RAM, faster GPU, more VRAM, faster SSD, faster CPU, more cores?

I'm on a cheesegrater Mac Pro running Sierra, so it's not the newest Mac in the world, but it has 16GB RAM and a mostly-empty SSD and quad Xeons, so it's certainly not the slowest, either.
If you want a better idea of the problem, you can check the console app installed in every mac by seeing the time the mac freezed and search that error code. You can also check if the problem is systematic by seeing the log files. First launch a window if finder and press cmd + shfit + g then type “/var/logs”