First of all, try the link given by Dulith1118. If it doesn't help, keep reading.
Windows 8.X and 10 update randomly and can cause BIG slowdowns for no apparent reason. I have windows 10 on a laptop that had windows 7 before and it works a bit smoother now BUT there are some random slowdowns with no apparent reason. Investiagation using the built-in windows tools revealed slowdown bursts came from heavy disk and CPU activity of some unkown (at least for me) windows system component. I presume that's windows update or the infamous windows 10 components that spy on you and phone home regularly.
Other possible culprit might be an antivirus program. Disable it while gaming - use the "turn off realtime protection" option or "game mode".
P.S. my laptop has a fast i5 CPU and 8 GB of RAM so hardware shouldn't cause slowdowns.