Lots of possibilities from hardware to software. From your description, I think the most common problems are malware or lack of free space on your HD. You have to review in your mind what was happening on the computer before this happened. Check how much free space you have and then try the following:
I assume that you are running an up-to-date anti-virus and have legitimate versions of software. What part of the computer is slow? If it used to be faster, you can get that speed back. Do you mean it takes forever to boot, too long to surf the web or is just generally slow? There are many possibilities. These are the most common causes of a slow computer and their solutions.
1. Do you have enough hard drive space?
Windows needs free space to function properly. Lack of adequate free space (even if you have no other problems) will slow a computer to a crawl.
Press Win key-E, and click on This PC, you will see a thermometer gauge under the C drive. You can also right-click on the C drive and select Properties for more information. At least 10% (better 20%) of your hard drive should be unused. If lack of free space is a problem, you have a choice between eliminating unwanted programs or files or installing a larger hard drive. You can easily clone (not copy) your existing hard drive onto a new and larger HD using the free version of Clonezilla or Macrium Reflect Free.
2. What is in the Start Up group?
Many programs install themselves in the start up group enabling them to load faster at the expense of constantly using computer memory and CPU resources. CCleaner, Tools, Startup will tell you what is running and also gives you the chance to right-click on the program and select disable, which does not uninstall the program but prevents it from loading every time you start the computer. You will still be able to run this program any time that you want. If you encounter a file that you are unfamiliar with, and you will, Google it to see what its function is and if it is safe to disable. Some programs like anti-virus belong here. Be careful!
3. Do you have enough RAM? If you have at least 8 gig, this is probably not your problem.
Right click on Computer or This PC on the Desktop and select Properties. Memory is cheap and easy to install, even on a laptop. Go to www.crucial.com and have it scan your computer to see exactly what memory your PC uses and to see how much it would cost to upgrade. (If your video card does not have adequate on-board video RAM, Windows will use system RAM for this purpose which reduces the amount available for Windows and other applications.)
4. Have you run the free versions of both Malwarebytes and CCleaner recently?
These will clean out a lot of crap and malware on your computer and free up hard drive space. Malware is far more common today than are viruses and most anti-virus do nothing to fight malware. If you are using Windows Defender, it already has a full-time anti-malware component and there is no reason to run Malwarebytes unless it makes you feel better. Also, run Belarc Advisor to get a list of exactly what hardware and software is on your computer. Print it and save it since it records the product keys necessary to reinstall some of the software if this ever becomes necessary. Remember that you do not gain space by deleting files until you empty the recycle bin.
5. If IE or Firefox is very slow opening pages, go to Help and select "Start without add-ons" and see if this speeds things up. If it does, go to Tools, Manage Add-ons and disable all add-ons and enable them one at a time until you find which ones are slowing down the browser. Also, uninstall unused search engines and other toolbars. Simply not using them is not enough. Don't have more than a few tabs open at the same time.
If you are not seeing the Menu bar, right click on an empty area at the top of the browser screen and check Menu Bar.
What Not To Do:
Don't use anything called an optimizer or registry editor except the one in CCleaner. Especially avoid any program that finds thousands of "errors" on your hard drive that you can only remove by buying their software. Manual defragging is not necessary on a modern hard drive- Win 7 and newer do this automatically. (I still defrag once or twice a year.) NEVER defrag a SSD.
Worst Case Scenario:
Only after trying all the steps listed above and if your system still has problems should you consider restoring to factory condition. Restoring to factory condition is usually a better choice than reinstalling Windows.