Generally speaking, X will be your best bet.
Now, I was working on a project…worked on Wayland and X…but has falled by the wayside. My goal is to map out some over the weekends in 2024 to pick it back up, but that is a ways out at the earliest. [TRACKING] Fun weekend project: Testing a new NVIDIA eGPU Switcher - #4 by Matt_Hartley
In the here and now, NVIDIA, X, Ubuntu 22.04 MATE with the GitHub - ubuntu-mate/mate-optimus: NVIDIA Optimus GPU switcher should be doable.