You could also look at your CPU fan curve, and try to increase the fan speed at or near the TJMax temperature. But, if that ...
The best CPU cooler for the Ryzen 9 7950X depends on your PC case and clearance over other components, such as RAM modules, but it ultimately needs to prevent the chip from getting too hot under load.