More money will often not solve the problem. In fact, it may compound the problem. Money often makes obvious our tragic human flaws, putting a spotlight on what we don't know. That is why, all too often, a person who comes into a sudden windfall of cash - let's say an inheritance, a pay raise, or lottery winnings - soon returns to the same financial mess, if not worse, than the mess they were in before.
Quotes like this are misleading. It puts this seed of doubt in your mind and makes you think "money can't buy happiness, maybe I shouldn't make money". When in reality, literally every single aspect of life improves when you're financially affluent. Lottery winners are the worst example to use because the people who play the lottery are usually extremely bad at managing their lives and finances. So they manage their winnings the same way and lose it all.