Excessive CPU and GPU stress. Code optimization done incorrectly?

Mine has been running fine until today when the CPU fan spun up so high I thought it was going to disintegrate. I shut down the flight and started again. It happened again. After 3 or 4 tries I was able to get a short flight in but the fan was still running quite hard.

MB: GIGABYTE Z790 AORUS ELITE AX
CPU: Intel Core i5-13th 13600KF
GPU: MSI Geforce RTX 4070 Ti Ventus 3X OC D6X 12GB
RAM: G.Skill Trident Z5 RGB 32GB (2 x 16GB)
SSD: (2x) WD_BLACK 2TB SN770 NVMe SSD
PSU: Corsair RM850 2021 80PLUS GOLD
CPU fan: DEEPCOOL AG620 CPU Cooler