This is a story with a moral that is more complicated than the story sounds. The real issue in this specific question is that if you're using the Edge browser, the default search engine is Bing. And the Bing search engine has a habit of displaying ads above real content when you do a search. So in this case the questioner was searching for Chrome and found an ad placed above the real link to download Google Chrome and was taken to a site that injected malware on to their computer. Not a great thing but the real fact is any search engine could do this.
It's just important that you hover your mouse over the link before you click on it and ensure that it's really going to the site you ought to be going to. If you're searching for Google Chrome it better be a site that's on google.com in order to download Google Chrome.
On another approach the EDGE browser doesn't need to use Bing as its default search engine. You can change that in the settings for the Edge browser. If you like to use Google as your default search engine no problem just make Edge use that as its default search. engine.