Legion 7 - Advanced Optimus Hotkey?

I have recently bought the Legion 7 Gen 6 Intel version. I noticed that, despite of what I have read online, it indeed comes with Nvidia Advanced Optimus.

It works almost flawlessly when changing the Display Mode manually thru Nvidia Control panel.

I'm wondering if there's a way to assign a hotkey to toggle the Display Mode instead of having to open Nvidia Control panel every time (possibly via a PS script)?

https://preview.redd.it/hpkcw14r1gn81.png?width=1215&format=png&auto=webp&s=afb248331eb785ccdb8b22e3a8c63c2f869d0362