I dont know why this is happening

so when im using unreal engine whenever i try to change the graphics or i change a rig and it crashes also does its compile and when i goto the project settings my unreal just gets this weird color invert and the lighting is All weird and stuff and when i click back on unreal its fine again but i get the lighting glitch and then it crashes after a bit
My specs:
CPU

11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz
Base speed:	2.69 GHz

GPU
Nvidia RTX 3050

RAM:
16GB
DDR N/A