Got a new GPU but only the monitor connected to the old GPU works

my new GPU is an XFX Radeon RX 5700XT and the old GPU is an Nvidia GTX 1060.
I have my 2nd monitor connected to the old one (Nvidia GTX 1060) because my new GPU (XFX Radeon RX 5700XT) only has 1 HDMI.
Only the monitor connected to my old GPU is currently working.
these are the drivers that are installed

Well you need a custom xorg config for that, since nvidia will be main if the nvidia driver has been installed: Chapter 33. Offloading Graphics Display with RandR 1.4

I believe optimus-manager should work aswell.

well I installed optimus-manager and it prompted me to restart and now I have the opposite problem. now only the monitor connected to the new GPU works.

No idea then. I guess you have to tinker with a custom xorg file then.

Here is a template:

I found out that there is optimus-manager-qt (a version that has a UI) and I installed that instead and started messing around with it and I found that if I switch to Nvidia all my monitors work.
but I assume that this is because at some point I installed the Nvidia drivers instead of the open source ones? and also that on this setting my old GPU is now being used instead of my new AMD GPU?
if this is the case then this is not the ideal situation.

i was looking at that and it seems quite intimidating. I’m still kinda new to Linux.