How to limit CPU usage for a website?

Hi everyone, my question is, how to limit a CPU usage for a website, is a WordPress an occasionally it consumes 100% cpu, how can it be limited?

Thank you!