Your description lacks details for a diagnosis, but my first thought is 'needs maintenance'. This can be a simple cleaning, it might be a broken fan, a loose heatsink, a need to renew thermal paste on cpu and/or gpu or maybe something else. There are very good videos on YouTube about these topics.
If you think it is something else, please provide detail about your system - including model numbers.