My advice is just do a bit of research on whatever it is you are installing. There is loads of good quality software available for Windows - much of it open source where you can also check the hash of the files you have downloaded to confirm they have not been tampered with, or even obtain & check the source code for yourself etc. Some software also provides two versions, the usual one, and a second 'portable' version. The portable ones don't make changes to your registry and can usually run from USB sticks etc. These are usually only light-weight tools however.
Then there are useful repo-like bits of software - Chocolatey is a good one that makes it easy to install new software (if someone has prepped it) and will tell you if the source is trusted or not. You can also choose to use the Windows Store, you won't get any malware that way - unless you count MS's own tracking as malware of course
Main thing is just don't go installing the first things you find on the internet. I'm sure there will be someone along to recommend an install manager in a bit, these track what changes every install makes to allow you to completely and cleanly remove the software at a later date.