The world is not only about dungeon delving
If the PCs have no interest in the things that gold can buy, then, at some point gold will lose its usefulness to them. There is no need to fix that. If you are a mendicant, gold has no value to you.
However, at least until level seven, a typical party is not swimming in gold they cannot use. And if you engage them with property, they may be struggling to get enough funds up to about level eleven. For the levels beyond, by the book there is no great use for gold, unless you move into warfare with armies and castles, and I would argue the best course of action is to accept this.
The top end for most published official campaigns is around level 11-15, so a use for gold is not the only problem you will have with high level parties. It might be the best solution to retire your characters once they are on that level. In most of the campaigns I played, that is what happened anyways, as the players want to try something new. When you end your campaigns around level 11, then the gap where there is no great use for gold is not large.
The different uses for gold have already been cited by many of the other answers. Here are some supporting calculations:
For reference, here is a chart of typical wealth per level and character for 5e, here is another for the whole party from David Hartlage using data from other blogs. Both are based on DMG encounter guidance, as there is no fixed table for this from the DMG like in Pathfinder. The numbers vary a little based on the assumptions made, but the order of magnitude is similar.
Equipment is still dear in the early levels
No matter how you look at it, in the first four levels of play the characters will struggle to buy the best equipment that is available in a city. A typical character at the start of level five has maybe 600 gp. That is far off from buying the best armor - a full plate clocking in at 1,500 gp. A silvered weapon as proxy for a magic weapon you can buy is going to cost 100 gp, too. Many useful items like Holy Water, Healing Potions, a Mastiff or Horse also cost 25 to 50 gp each. Low level scrolls may be bought sometimes for 50 to 150 gp.
Spell components and research
While not every party has a wizard, the class is cash-hungry. On early levels they need diamonds, pearls and the like for up to 100 gp apiece as components for some spells. Even if those are not consumed in the casting, wizards need to buy them first. Other spells like find familiar have components of gold value that are consumed. Raise dead will cost 500 gp. At higher levels components get more costly, for example 1,000 gp for a scrying crystal ball. Several spells consume diamond dust or jewels worth 1,000 gp or more, a good way to burn extraneous wealth. Spells cost 50 gp per spell level to transcribe, so transcribing a spellbook can be dear, with a single mid-level spell costing several hundred gp. Spell casters may also create their own magic items or scribe scrolls if the GM agrees, with optional rules provided in Xanathar's Guide to Everything, so this is a semi-official solution, if the players spend the time and effort on it.
Just like in the real world, money is power. You can use it to buy services of others, to bribe officials, to improve your social standing, to live in luxury, or to hire help. For example, there are rules for hirelings, which for a skilled one start at 2 gp per day. Firepower-wise, hiring a squad of crossbow-men is likely stronger bang for the gp than a magic item in the mid-levels. If you allow for more experienced NPCs to be hired at higher rates, there are a lot of useful effects. Hire a low-level wizard instead of having a wand of knock and a ring of invisibility. Of course, the downside to this is overhead in managing these troops and helpers, and the DM may also rule that they will earn their share of the XP in encounters. In the original D&D campaign, higher level characters had whole armies to follow them around, and that is what used up much of their gold.
Mansions, keeps, and towers
OD&D had rules for this, and I think this was brilliant. As the characters become rich and powerful in the game world, they take a leading role in society, and acquire land and property. This can open up an entire sub-game where you manage your castle and domain, troops, towns and villages. It can be a cause of adventure as you clear your domain from monsters, fend off new monsters to protect your peasants, venture out to kill the dragon who has taken residence in the old ruins, wage war against neighboring lords, forge alliances, deal with intrigue at court, and so forth. It gives you a wider perspective beyond just becoming the most efficient killing machine you can dream of, and provides a sense of community and belonging.
This can easily consume a lot of coin for both building and maintaining those keeps and troops in the medium-high levels. A fortified tower already costs 15,000 gp and a keep costs 50,000 gp. That alone would be enough to consume the entire party's funds up to about level nine. A full blown castle costs 500,000 gp and would consume all their money up to level 17. They likely will win the original keep as payment for an adventure, or take the half-ruined castle the bad guys occupied before, but even then, remodeling, repairs, buying off the legal owners etc. can be costly.