Sounds like the GPU is faulty or overheating.
You might have some success from opening up the laptop, cleaning every individual part with 99.9% isopropyl alcohol and reassembling it. However this is not an "easy" job. There will be dozens of screws all different sizes, and you would need a set of miniature screwdrivers to open it, and likely there will be plastic tabs holding everything together that you will need to find and unlatch. I would estimate 4 hours work to fully disassemble, clean, and reassemble a laptop for the first time. Find a guide on Youtube for your specific laptop to help you.
This is also not guaranteed to fix your issue. Cleaning out a laptop is good practice and should be done every 1-2 years, but your issue might be more than just overheating, the GPU itself may be faulty in which case no amount of cleaning will fix it, and there is not much else you can do.