This question comes from Daniel, who notes that people sometimes say "If I had all the money in the world…" in order to discuss what they'd do if they had no financial constraints.
Of course, it's natural to then ask, "What would happen if you literally had all the world's money?" I don't know how you would actually gather all the world's money.
So, let's just assume that you invented some kind of a money summoning magic spell.
Most of the world's wealth isn't physical money. It's land and houses, bank accounts, businesses, intellectual property, cryptocurrency, and so on.
In theory, you could edit all the property records on Earth to say you own all the stuff and edit all the banking records to say you own all the money.
But everyone else would disagree with those records and they would edit them back or ignore them.
Money is an idea and you can't make the entire world agree with your version of the idea.
Getting all the world's cash, on the other hand, is much more straightforward.
At any given time, there is a certain amount in the world. Right now, it's somewhere north of 10 trillion, and you want it all.
It won't necessarily do anything for you since without the cooperation of the outside world, you probably won't be able to spend it.