Horrible lag spikes (pc)

I started playing Elden ring for the first time yesterday (PC) but, I've been getting horrible lag spikes up to 20 seconds long and its making playing the game super frustrating. The lag spikes appear seemingly out of nowhere and unpredictably. I don't know how to fix this, i have put my graphics settings to medium which I shouldn't need to since i have relatively high end specs (RTX 3060, Ryzen 7 5700x). Does anyone know how to fix this? Any help is appreciated.