I built myself a computer a few years ago and apart from some common first-build issues, it was working fine for a while. About 1 year ago, my CPU started overheating more and more quickly (At the end it was getting to 100C after 30 seconds of the PC being on, followed by the PC turning off). After trying numerous fixes, changing the thermal paste, etc., I changed the 1-year-old AIO with the stock fan from the CPU and it started working fine again, until recently. One of my RAM sticks recently gave out and the PC wouldn't turn on. I removed the stick that didn't work and left the other one and once again, everything was fine. Currently, there are no actual crashes, overheating, etc., but the PC has slowed down by a huge amount, compared to when I first built it. For reference - I used to run Minecraft with shaders and a hyper-realistic texture pack and maxed out settings at 100-120fps. Currently, I have removed all shaders, and texture packs and lowered most settings so I can get it back up to over 100fps, and it doesn't even reach 144. Another game that used to run perfectly was League of Legends - maxed out at 1440p, it wouldn't budge from 144fps, currently, at 1080p, it's running at 100-140fps.
The CPU seems to be working fine (As I am writing this, 40.65C and 4% usage), and the GPU is showing up as expected and doesn't seem to be overheating either. The (now 16GB) of RAM is at 36% usage at idle (maybe that's an issue?) and everything else seems to be working just fine. What could be causing this slowdown? Should I replace the RAM altogether, or buy a new AIO or something? Thanks.
Ryzen 5 5600X
32GB RAM (Now 16, after I removed one of the sticks) at 2667MHz (I have XMS turned off)
MSI MAG B550 Tomahawk Motherboard
AIO was the Lian-Li Gallahad (currently the stock one from the CPU)
EVGA Gold 850W Power Supply
Hard drives are 2 SSDs and 1 NVMe, if that matters for some reason
OS is Windows 10 64-bit