your Ryzen 5600 Processor has a Maximum Operating Temperature of 90c. Which means it will start to throttle or slow down once the temp reaches or surpasses 90c.
So, basically your CPU is overheating if the temps goes past 90c.
Which means the first thing I would look at is your CPU Cooler.
Make sure it is installed correctly and the fan is running at Maximum speed when it getting hot. That it is making good tight contact with the surface of the Processor.
Also not sure the exact Excavator CPU Cooler you have but the one I saw had a TDP Rating of 105 Watts which I believe is under-powered for your 65 Watt TDP Processor.
Personally, I believe you will need a CPU Cooler rated at least 150 Watts or higher for your processor not to overheat under heavy loads.
Also check to see if you have poor air circulation inside your PC Case by removing the side panel and see if the CPU temps is slight lower then when it is closed.