Computers do housekeeping when they think you are not busy: downloading updates, scanning for malware, rebuilding the search index and optimising the drive. Each of those tasks is deliberately low priority, but they still consume disk and processor time.
The result is a slowdown that arrives without warning and disappears just as mysteriously, which makes people suspect failing hardware or an infection.
You can usually confirm it in a minute. Open the system's task monitor, sort by disk or processor use, and look for update, defender, search or backup processes at the top.
The fix is scheduling rather than disabling. Move scans and updates to a time when the machine is on but unused, and let indexing finish once rather than restarting it repeatedly.