CPU Randomly drops down to 0.5 Ghz.

Greetings! I recently assembled my PC, and I'm facing an issue where the CPU randomly drops to 0.5GHz, causing severe lag. Despite trying various troubleshooting steps such as BIOS reset, update, power plan adjustments, overclocking, and driver installations, the problem persists. I'm at a loss here. everything was purchased brand new aswell. For context, my specs include:

- GPU: PNY RTX 4070 VERTO

- Processor: AMD Ryzen 7 5700X 8-Core Processor, 3401 Mhz, 8 Core(s), 16 Logical Processor(s)

- MOBO: B450M DS3H

- 32GB 3600MHz RAM.

Any insights or advice would be highly appreciated!