It's weirdly difficult, probably because it isn't something the designers thought anyone would particularly want to do.
Your best bet is probably a carefully worded Wish, and the hope that this being an extremely low-power use of Wish the DM won't twist it on you.
However, there is one explicit way - be a 14th level Wizard of the Transmutation school. Then, spend 8 hours creating a transmuter's stone, and another 10 minutes using the Major Transformation ability. This will allow you to turn one object no larger than a 5-foot cube into another object of similar size and mass and equal or lesser value.
And yes, this is ridiculously restrictive. And it's bizarre that this appears to be the only way, which is why I suspect this isn't something the creators of the game thought anyone would care about.
Even more restricted alternatives include:
- Fabricate, which allows you to turn raw materials into finished objects.
- Stone Shape, which allows you to turn something made of stone into something else made of stone.
For the specific case of making pumpkin carriages, there's a spell that should work for you - Creation. You'll need to cast it out of a fairly high-level slot to create a full-sized carriage, but if True Polymorph is on the menu this shouldn't be a problem. Pumpkin is quite definitely vegetable matter, so it should last a day; plenty of time to get Cinderella to and from the ball. Of course, 100gp would get you a mundane, ordinary carriage, so you could just do that. Alternatively, Wish can create pretty much any nonmagical object, so you could do that too.