Use a Windows version currently supported by Microsoft
Keep Windows updated
Add the rider64.exe, JetBrains.ReSharper.Host64.exe, msbuild.exe, your project/solution folders, and ReSharper cache folder (by default %HomePath%\.Rider<version>\system\resharper-host\local\Transient) to the ignore list of Windows Defender (and other antivirus software).
Stop unnecessary services and processes
Exclude your project/solution folders and ReSharper cache folder from Windows indexing