How to discover why computer keeps freezing

I recently upgraded to a core I7, 16gb Ram, 512 ssd, Nvidia Geforce 1060, and the PC gets completely frozen sometimes when using Firefox, and almost every single time I try to save a inkscape file that has rasterized images in it to PDF. I had an older PC with lower specs and never had this issue.
I can easily repeat the conditions to make the computer freeze. How can I see any sort of log so I can see what exactly is causing the problem and share it here to get help?

You can get a log of the previous boot (assuming you reboot after the freeze) using:

sudo journalctl -b -1

I would not be surprised if the problem has to do with running out of memory. 16 Gb is decent for most purposes but these rasterized images can take up quite some memory and if Linux is running out of memory it becomes very, very slow.

Here I read you could issue “SysRq-F” the execute a Out-Of-Memory (OOM) killer, would be good to give that a try to see if it indeed and out-of-memory problem.

This is what comes back

Specifying boot ID or boot offset has no effect, no persistent journal was found.

Lastly, I know the files is heavy, but I have been using inkscape for years, and I have no issue loading or saving this file on my old pc which has lower specs and less memory.

Persistent logging requires existence of /var/log/journal. Create it and the next boot will have journalctl -b -1 working.

Have you run an extended (e.g. overnight) RAM test with memtest86?

My guess would also be memory issue. Lately 15.1 eats memory like crazy.
Check with Ksysguard how your memory and Swap behaves. I put a widget for that on my takmenu in KDE just realized why my notebooks started to freeze and added more swap.