Happiness is composed of many different elements.
The most common ones would be happiness that comes with materialism/physiological need, passion, mental health and connection.
Materialism / physiological need
Generally speaking, happiness that is bought with money tends to be very temporary.
Humans, in nature, adapt to environments extremely quickly. So even the wealthiest environment will become a total bore to you sooner or later.
For example, notice how we are unable to be thankful for a comfortable life compared to the old times. (not that I wish to imply that we SHOULD be thankful)
However, when it comes to food and comforting homes, things are a little bit different. People are most likely to be mentally ill and unhappy when their physiological needs are not met.
But most jobs allow you to keep bringing food on the table, so one could argue that there isn't much point in being extremely rich. Personally, I think it's terribly boring to get anything you want.
Passion
This is when a person has something that he or she loves doing so much that they are able to focus for hours without noticing it. (ex) gaming, animating, drawing, making games, making shit some other kind of work that may not be art related etc
Personally speaking, I think people with dreamjobs are much happier than those with a boring job with a lot of money. Money can support this passion, but cannot create it.
Mental Health
There are just people who are genetically disposed to feel sadness more often than others. Unbalanced chemicals in the brain can cause clinical depression, bipolar disorder, ADHD, borderline personality disorder, etc.
Money can afford treatments, but there are many mental disorders that cannot be cured entirely. Most people with mental illnesses desire happiness that isn't from money (or so I've read. You can prove me wrong on this one lol)
Delusional state of mind, at most times cannot be satisfied with money. Like being a total religious nut or thinking that he or she is the most popular person in the world or that the world is going to be saved by a huge spaceship in the future, etc.
Connection
This is where the argument of "Having a loving family is much better than being alone and filthy rich" comes in. According to Maslow's theory of self-actualization (which would be the ultimate happiness, so to speak),
happiness requires both physiological needs and the feeling of being loved. Humans in nature, are very lonely creatures (or perhaps we evolved to be in order to survive). It's hard to tell if the person who is seemingly
in love with you is investing his or her time in you for money or connection when you are rich as shit.
In conclusion, money does "buy" happiness to a certain degree. But it is evident that there are categories of happiness that money is unable to touch.
Happiness is also a subjective term so it's difficult to generalize. If I had a lot of money, I would travel around the world !