The spell Wall of Stone allows you to create stone walls and fortifications from thin air. At 60 hp per inch, the difficulty of getting out of it would add up fast.
Since the wall doesn't have to be a specific shape, it seems one could make a dome out of it. A quarter of a dome 10 feet high and 35 feet in radius (putting the target in a corner of a room) takes up 90% of the surface area available, with plenty to cover inefficiencies, and few creatures could get out from under it, even if they made their Dex save.
If the above wall were double thick (casting a second dome right over the first), this puts 360 hp of stone between the target and escape. In the extreme case, placing all 10 panels together to block off a dead end corridor is 1,800 hp, still with a 15 AC to hit (and is 5 feet thick). With a single spell. This effectively ends any attempts to escape inside combat, concentration presumed.
Is there a RAW reason that I cannot trap someone behind 5 feet of stone?
If the space is small enough, say, they failed the save on being trapped in their 5 ft square, is there a RAW reason suffocation would or wouldn't be a factor, or is it entirely the DM's discretion? There is some precedence,
in the Oozing Temple, one of the optional dungeons in Ch 2 of OOTA.
I realize Stone Shape, Passwall, Dispel Magic (to an extent), and Transmute Rock all work as magic counters.