Hello and welcome to the forum.
Hi, does anyone know how to avoid possible dangerous/annoying programs to be added automatically on Windows 10?
No not really.
IF you are talking about some of the insidious PUPs (Potentially Unwanted Programs) or PUMs (Potentially Unwanted Modifications) that often come bundled with downloadable third party software from some sites, then......
You can be your own best friend or worst enemy.
Do your best to only use reputable sources for downloads and whenever possible go right to the software source (the people who actually created the program).
For instance if you search for
VLC Player or Ccleaner you'll probably get links pointing to FileHippo, Cnet, and some others those are third party sites and you can be pretty sure, there'll be bloat in what they provide.
However if you go instead to
http://www.piriform.com/ccleaner/download for Ccleaner
AND
http://get.videolan.org/vlc/2.2.4/win32/vlc-2.2.4-win32.exe for VLC Player you won't be bothered with browser hijackers and other such crap.