Question PC freezing and disconnecting from motherboard

Jul 29, 2020
I posted on here a few days ago and have changed some things since then. Now, other issues are happening.

For context:
Over the past couple weeks, I have been having this issue. Whenever I start a program that uses a decent amount of my computer's memory (League of Legends), my monitor was showing a random color (blue, green, black, gray, etc.), and the monitor disconnected. Audio still came through and I could still talk through my mic, but the screen completely froze. It showed a frozen view of my game to people that I was sharing screens with via Discord. It started occurring when I changed from integrated graphics on my motherboard to my graphics card (different situation for another time). All drivers are up to date.
Now, I had the idea of switching to an older graphics card I had laying around (MSI GeForce GTX 970 Gaming), and it was working for a few days. Now, today, a similar thing is happening, but it does not show a color before disconnecting. It just gives me a black screen. All drivers are still up to date. Any help is appreciated!

My specs:
Graphics Card: MSI GeForce GTX 1050ti
Motherboard: Asus Prime Z37O-A 11
Processor: Intel Core i7
RAM: 16GB Corsair Vengeance Pro
Power Supply: Corsair 650W