First, open nvidia settings (right click or even search windows). After that, click Manage 3D Settings, choose the Global Settings, Choose High-Performance NVIDIA processor. Add a launcher to nvidia program settings from the apps you want to run (if it's not already on the program settings list). Make sure to use the Global Setting (High-Performance NVIDIA processor).
I am happy if this article is useful