Screen function crashing on laptop

I am trying to write some code for a simple perceptual response task on my laptop, but my code is crashing as soon as it gets to the Screen function. I am getting various error messages saying its likely something to do with my vertical sync but I cannot work it out.
I am on a 64-bit windows 10 computer with an Intel core i5 9th gen processor, 8gb ram. My display graphics use an Intel UHD Graphics 630 and a NVIDIA GeForce GTX 1650.
I have followed all of the recommendations in the SyncTroubles page and cannot resolve the issue. I believe the sync issues may be caused by having 2 graphics cards. Has anyone been able to fix this before?