My laptop keeps on freezing randomly

Please switch to a supported kernel or LTS one, as the one you are using is EOL.

Might want to address that too, was covered multiple times on the forum.

Use at least a swapfile, or use zram-generator package from repositories.

Edit: Also, just saw that