Laptop freezes and fan starts working loudly

Mar 16, 2018
My laptop freezes randomly and fan starts working loudly. This happens every 2 or 3 hours. I recently installed Fedora OS on my laptop and that's when problem started. After that I took my laptop to a service and they changed my hdd (hard drive). Anyway, after that I installed Fedora again and same problem happened. I am pretty sure that the problem isn't with Fedora because a friend of mine installed the exact same Fedora(from the same USB drive) on his laptop and he had no problems. Does anyone have any idea what could be the cause of this problem and how could I solve it?

I already payed a lot of money for new hdd and I am feeling pretty desperate.