I had this problem where my primary monitor was plugged into the DVI port on my GFX card and my secondary monitor was plugged into the DVI port on my motherboard - the secondary was coming up as number 1 and primary as number 2.
It ended up being a BIOS setting that fixed it - I noticed that BIOS loaded up on the secondary monitor so the problem couldn't be Windows specific. I had a look the various menus and found there was a setting to force the BIOS to make the monitor plugged
into the GFX the primary, rather than let it sort out which monitor was which automatically. Once I did this, Windows followed suit. For my BIOS (Asus) it was: Change to "Advanced" mode -> Advanced -> System Agent (SA) Configuration -> Graphics Configuration
-> Primary Display, change Auto to PCI-E. I also enabled iGPU but I don't know if this did anything.
I realise not everyone here having problems has the same set up as this so this might not solve it for them, but it's worth a shot if you do.