If you would like help troubleshooting the issue, reply with your full PC specifications. CPU, GPU, RAM Capacity and Speed, Drive SSD or HDD, and PSU. Without these specs no one can really help solve the problem you are experiencing.
Ryzen 7 7700X, MSI MAG X670E Tomahawk Wifi, Corsair DOMINATOR® TITANIUM RGB 2x16GB DDR5 DRAM 6000MT/s CL30, AMD Radeon RX 7900 XT, Corsair HX Series™ HX1000, Corsair MP600 PRO NH 4TB