The party is deep into my 5e-updated classic Greyhawk Giants series.
The giants are about to attack the outer walls of the Sterish city of Headwater in an attempt to take the city.
Many monsters, such as the Ogre Battering ram, have the Siege Monster property, which says "The [monster] deals double damage to objects and structures."
The DMG (255, 256) has rules for siege equipment, their attacks, and damage.
On hit points for objects, the DMG also says that stone objects have AC17 (246) and that (247):
An object's hit points measure how much damage it can take before losing structural integrity. Resilient objects have more hit points than fragile ones. Large objects also tend to have more hit points than small ones, unless breaking a small part of the object is just as effective as breaking the whole thing. The Object Hit Points table provides suggested hit points for fragile and resilient objects that are Large or smaller [Large, resilient objects have a suggested 27 hp]...Normal weapons are of little use against many Huge and Gargantuan objects, such as a...towering column of stone...You can track a Huge or Gargantuan object's hit points if you like, or you can simply decide how long the object can withstand whatever weapon or force is acting against it. If you track hit points for the object, divide it into Large or smaller sections, and track each section's hit points separately. Destroying one of those sections could ruin the entire object...Damage Threshold. Big objects such as castle walls often have extra resilience represented by a damage threshold. An object with a damage threshold has immunity to all damage unless it takes an amount of damage from a single attack or effect equal to or greater than its damage threshold, in which case it takes damage as normal. Any damage that fails to meet or exceed the object's damage threshold is considered superficial and doesn't reduce the object's hit points.
So it seems like, RAW, I assign hit points to large (10' x 10') sections of a gargantuan (20' x 20'+) stone wall, assign a damage threshold for the wall, and then apply damage as rolled until the wall fails its structural integrity, at which point the attackers move through the rubble as difficult terrain.
I can't find any guidance in the DMG for what the appropriate damage threshold would be for a stone wall, or, for that matter, how hit points and damage threshold might vary between a stone wall, a tower (round or square), a gatehouse, etc. While I could, of course, just make these up, I wonder if there is any guidance in other official sources, or at least analogies that can be made with, for example, the vehicle rules (in BG:DiA) or the ship rules (in GoS).
Very related, possible duplicate, but all answers there predate publication of GoS and BG:DiA which this question is specifically soliciting: How should damage thresholds be assigned?