iMac shuts down when watching YouTube/NBA livestream
Hello! I am having a problem with my iMac 27" 2019. Whenever I am watching a YouTube video or watching a NBA livestream game it shuts down. I touch the power on button later and it looks okay. It started happening since like february 2020. These couple months it happened like 2-3 times but now it happens frequently. I can run Lightroom and Photoshop together and it works perfectly but whenever I go watch a YouTube video or NBA livestream game it shut down itself. One thing I have noticed is that it happens on Google Chrome. I tried watching a NBA livestream game the other day on Firefox and it worked fine. What could be the problem?
iMac 27″, macOS 10.15