Anyway to limit number of threads

Is there a way to limit the number of threads the game creates/uses?

No, because engine create threads for various things and they are coded to work that way.

Note that threads is actually subprocess of process, they existed way before multi core CPUs was a thing and there whole point is to run code on background that does not need to wait on execution of main thread to be scheduled to CPU like they are separate process, it’s a primerly OS multi tasking feature. So lot of application are multithreaded by design, not specifically to utilize more cores. If you look on task manager and show number of threads per process you will see that programs running on single thread is rarity, you can barely even find one. Thing is majority of those threads are unable to saturate the CPU with work, task they doing are complete too quickly to make impact.

That said if specific feature do create multiple threads to process something they may have thread number limiters. Like for example worker threads(used in multi threaded ticks too i think) is limited in compilation time here, but changing that requires engine recompilation:

https://github.com/EpicGames/UnrealEngine/blob/7d9919ac7bfd80b7483012eab342cb427d60e8c9/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp#L1607