Honestly? Easiest method is to do a fresh install. I use Windows LTSC which essentially skips all the bloat and spyware in consumer versions of Windows.
If a fresh reinstall isn't viable, there's a collection of batch scripts someone built a while ago called Tron (it fights for the user!). It does a lot of diagnostics, repair, debloat, and optimization, but takes a long time to run.