No it isn't really about money, but about having an instinct for products, users, quality, and which opportunities are important and which are not. Have those in place and financial success will eventually follow.
This doesn't mean it is easily achievable. It certainly isn't. The distinction lies in not being delusional about how the important customers see you. And Yahoo was, for most of the time I paid attention, horribly delusional.
If we're going to focus on financial success it is important to use the correct measuring stick. You have to look at the delta between the potential and the actual value realized. Conservatively, the potential for Yahoo was at least an order of magnitude higher than the peak value. It had money, it had the biggest email service in the world, it had lots of eyeballs, it owned a good chunk of the world's web search talent, it even owned certain key advertising patents.
And it managed to squander every single one of those advantages - without exception. It was fucking painful to watch and even more painful to be part of it. At least until I decided to leave because none of the products I cared about were actually good enough that I'd use them myself.
I remember one afternoon when I was trying to figure out a shortcoming in a Yahoo product - one of the five or so products featured prominently on the front page. I asked around who I should talk to and eventually I realized that the product had zero developers - they had all been absorbed into a team that was working on something entirely different. When poking around I was told that "the CEO uses the product and thinks it is fine - so it is done. There is no need for developers or any further development". This was Yahoo Calendar. If you think back to the early 2000s, calendar was the unsolved piece of the replace-Microsoft-Office problem. Calendar was strategically important for defending the email position. And they didn't even understand that. They had zero strategic understanding of the space their products were competing in. Of course they lost the position. As anyone who paid attention knew they would.
The peak value of Yahoo was only that high to begin with because of very fortunate investments early on. Not because they actually knew how to do products. They had no idea how to build product. Be it search, email, or advertising platform. Not for lack of technical talent, but due to grossly incompetent leadership and an organization stuffed chock-full of useless middle managers.
Yahoo had the potential. But not the leadership to realize it.
Also, keep in mind that Yahoo itself had a negative valuation at one point - it was worth less than the value of its assets.