Laptop Problems; Samsung Ultrabook Series 5

I think it's been happening for a month now. My laptop screen 'glitches' - the images distorting and sometimes green text appearing - before righting itself and crashing. The only way I can get the laptop to function again is to turn it off via the power button or take the battery out and put it back it again. It has also become slow starting up - taking at least five minutes before you can log in and then a further five before you can actually do anything. The cursor sometimes gets stuck in the center of the screen - I can access things using the tab screen but the cursor won't move, whether I use the laptop touchpad or my USB mouse. The fan has also been sporadically speeding up before calming down again - even though I've been doing the same thing for the past god knows when.

I've done a boot-up scan using avast, had a look through all of my files and gotten rid of any old files that I don't need on there, in an attempt to create some space but I've got about 600-700 gb free so I can't see why that should be a problem. Nothing happens before the glitches/crashes so I don't think I'm causing it by moving it and so on.

About a month ago, the charger port was fixed at a laptop repair shop, and then the laptop itself was sent off to SAMSUNG to have the motherboard replaced because I mistakenly wiped the bios (since one driver update shut the laptop off in the middle of the bios update) so I don't know if something is loose and so on. I'm planning on selling it in a month or two so it's not that much of a problem, but of course I don't want to sell it to someone if its being a pain in the backside. I also switched from integrated graphics to a nvidia geforce graphics card (that is in the laptop when I bought it) so that might be why?

This sort of problem is tough to troubleshoot over the internet. It could be quite a few things that could cause the symptoms that you're experiencing. With that said, I'd probably start with updating the discrete GPU drivers. Since you did switch from integrated to discrete, this could be the main cause for the graphic glitches which is probably crashing the system.

Moving forward, I think you should download something like CPU-Z to monitor the CPU load and temperatures during the crashes. It could be that your CPU is overheating and could use some attention.

It's really worth checking the Graphic card drivers are correct,
So in Device manager;
(Start key + X) then click on 'Device manager'.
Then; 'Display adapters' then right-click on the line below that, choose either,
'Update driver' or Uninstall driver, then reboot the PC and let Windows find the card and reinstall the driver itself.
If it was mine I would also do 'sfc /scannow' in a DOS window to check (and fix) any simple O/S issues.