Check out the AMD Ryzen High Performance Power Plan

Looks like you might want to improve your cpu cooler or case airflow (or both).