Unreal engine keeps freezing

I got a solution, somewhat. so basically I was trying to stress test the PC by playing games and realized that all the games were using the integrated gpu, so i went over to disable the integrated gpu and now unreal does no freeze. however, it is very laggy like the frames dropped to 2 frames a second which wasnt happening before. is there a way to fix this. i am using a AMD gpu if you are wondering