A single gold piece weighs .02 pounds in DnD 5e, meaning that 50 coins weighs a pound.
Assuming that coins are purely made of gold, a gold coin would be about 1.5mm thick with a diameter of 20mm. For reference, that’s slightly bigger than a dime.
So, if your party slays a dragon and finds a treasure hoard of 50,000 gold pieces, they have a new quest on their hands – transporting 1,000 pounds of gold back to base camp.
As long as it’s all gold pieces, though, it should all fit pretty snugly. Even 50k gp would fit in a chest that’s only a foot on each side.
A Bag of Holding can hold up to 500 pounds, so if gold is all you’re storing, it’s good for up 25k at a time. Space is not an issue at all – gold is dense!