I'm going to write two things I would check out.
1. How long since the canned air to the heatsink and vents has been done.
(What is canned air and use is all over the web.)
2. For Youtube disable GPU acceleration in the browser and re-testing.
My computer will freeze while I'm watching Youtube, along with an annoying buzzing sound. It also just freezes without any sounds. It has also been restarting while I'm playing games. Help me!
Processor: Intel(R) Pentium(R) CPU J4205 @ 1.5GHz 1.50 GHz
Installed Ram: 4.00 GB (3.82 GB usable)
System Type: 64-bit Operating System, x64-based processor
Edition: Windows 10 Home
Installed on: 30-May-18
OS Build: 17134.407