Money can't buy happiness.
But it can fix a lot of the stuff that's making you un-happy.
These are not the same thing, so it really matters that we understand what the definitions are for what we're dealing with.
Being happy has both internal and external causes, and it also has both internal and external deficits. If you don't have enough nourishing and tasty food, you will almost certainly be less happy. This is an external cause. If you are being abused, you will definitely be less happy. This is an external cause. If you have a lot of time to spend with wonderful people who care about you, you will probably be happy. This is an external cause.
But at the same time, a lot of the causes of happiness are internal. If you are a spiteful person, you are probably not going to be very happy no matter what your life circumstances are. On the other hand, if you are a cheerful person, chances are you will be happy even in circumstances that are objectively not great. These are internal causes. They'll be the same no matter what.
And the thing is, money can affect some (not all!) of the external factors of happiness, but does almost nothing about the the internal factors. Money can buy good food that you like. Money can buy escape from an abusive situation. Money can fix terrible living conditions. Money can give you the freedom to quit a shitty job with a horrible boss. Money can buy you time to spend with friends ... but money can't buy actual friendships. Not ones that are solid enough to increase your happiness in the long run. Sycophants are not the same thing as friends.
As for the internal factors that influence happiness ... there is a little bit you can do with money to affect them. Money can pay for therapy, which can help with the internal factors, but only if you're actually willing to do the work ... and if the problem is "negative personality," 'willingness to do the hard work of changing your outlook' is much more important than whether or not you have a therapist. (Obviously, if it's an actual problem like a mood disorder, that's different, and you are more likely to need a therapist--and a doctor who can prescribe meds. But there are a lot of people out there who don't have any kind of mental health problem, they'd just benefit from an attitude adjustment.)
When people say "money can't buy happiness" they're assuming a default state of being safe and having all your physical and social needs met, or at least within shouting distance of being met. Your life doesn't have to be perfect, but you're not being abused, your job is no more than averagely bad, you've got a safe and secure place to live, etc. And once you hit that point ... adding additional money will not affect your long-term happiness. The things that will affect your happiness are things like your relationships and your attitude. Which is why so many rich people are absolutely miserable--they genuinely think you can buy happiness, that an extra mansion or a fancy car or surrounding themselves with sycophants who will kowtow to their every whim will make them happy. And it won't! It just won't. Momentary pleasure isn't the same thing.
But there is a point where money can buy happiness, and that point is when you don't have enough of it to fix basic problems of safety and food and housing, etc.