Force iGPU / dGPU use by an application
Sometimes, an application will pick the wrong type of GPU. For example, needlesly using the discrete GPU, which has rather high power draw even when running in power efficiency mode. Or in other times, using integrated GPU, which offers abysmal performance and is suited for power efficiency.
In this case, you can use the Nvidia control panel to force a GPU. You have two options: Picking a globally preferred GPU, or forcing specific application to always use a specific GPU. You can also do both - for example, set globally to prefer iGPU, and use dGPU on your demanding application.
Nvidia control panel
1. First, make sure you have iGPU enabled. For example in case of Lenovo Legion, you have “Hybrid mode” enabled.
2. Head to the Nvidia control panel
3. Set either the global settings, or the program settings, or both, to your preferred GPU. If you don't see the option to pick the “preffered graphics processor,” make sure you have iGPU enabled.
Windows native solution
Alternatively, you can use the built-in windows feature, which should achieve the same results. You can try this windows guide:
How to Choose Which GPU a Game Uses on Windows 10 (howtogeek.com)