Since you did not mention Linux, I assume you're asking for a way to do it in Windows.
1. Quickest route
Control Panel > Power Options > Change Plan Settings
Scroll down to power management and lower
Maximum processor state to a value lower than 100%. Moving to even 99% will remove turbo boost and will probably leave it running somewhere close to 3Ghz. You can experiment with lower values until you find something adequate.
View attachment 101979
2. Second fastest route is to enable the Maximum processor frequency setting you see in the screenshot above. I'll leave a link here:
Maximum processor frequency specifies the operating frequency of your CPU's core. Maximum processor frequency is hidden and set to 0 by default, which means your processor runs as fast as allowed. Advanced users can slow down the processor if your computer is running hot or consuming too much power.
www.majorgeeks.com
3. The complex route but also the most rewarding in terms of flexibility and options is
Throttlestop. If you ever want to spend hours tweaking an Intel mobile CPU, then this is the software for you. Over the years it has become a very powerful tool. For example, you should be able to change the power limits instead of the clocks (or both), which can squeeze more performance in lightly threaded workloads.
4. Other options: there's a non-zero chance you can disable turbo boost in UEFI, you can also check if your laptop model has a config app that exposes some UEFI option directly from Windows. Your mileage may vary depending on laptop brand and model. Some laptop makers offer multiple cooling profiles (configurable in app or in UEFI) which affect the power limits.