Pc unplayable

I recently built a mini PC with a ryzen 3 3200g and rtx 4060 but due to wanting a litle bit better performance i upgraded to a ryzen 5 5600, i installed it earlier but it's completely unplayable, I'm only getting 2 fps on fortnite, and that's even if i can load up the game. It keeps restarting randomly too, I'm not sure if it's to do with this error "New CPU installed, fTPM/PSP NV corrupted" when it first booted up, i just pressed Y and windows came on as normal. This is my first pc build so I don't know much about this.

Edit I have tried updating the bios and unplugged the cmos battery but no fix