Question PC has been freezing randomly without pattern since getting new GPU

Mar 19, 2021
So recently I installed a new GPU which I bought used, I am hopeful I didn't get scammed and I'm also convinced its a software issue. As the title says though, the pc randomly freezes without a pattern, when on desktop, google, games, whatever and it'll crash, be it 1 hour or 8 hours into use, and then I have to hard reboot. Although the crashes don't ever happen without the GPU, or when I'm using integrated graphics, so I'm not sure if the GPU is faulty or something else like PSU or PCI-E slot (I am saying this because with my old GPU, a GTX 670, I had problems with inserting it a lot, and same with the RX 580 so I am worried I may have damaged it, and I can't use the second slot as there isn't enough space).
I am hopeless and this is what I've tried so far: update mobo bios, reflash gpu bios, reinstall win10, reinstall drivers, memtest86, underclocking gpu, and a bunch of other stuff which I can't remember.
My specs (everything here is new besides GPU):
Mobo: ASUS Prime Z390M Plus
GPU: RX 580 4GB
CPU: Intel i5-9600k
Ram: DDR4 16GBx2 3200mhz (I have XMP enabled)
HDD: Seagate BarraCuda 2TB 7200RPM
SSD: Silicone Power M.2 512GB R/ 3,400 W/2,300
PSU: Corsair CX650M 80 Plus Bronze(650W)
If you need any other info go ahead and ask and thank you if you will make an attempt at helping I'm truely clueless.