#Almost any creature could escape before suffocating
In most circumstances, the victim would have ample time to chisel their way out.
Wall of Stone creates 10 foot panels (or larger). So let’s assume: (1) your spellcaster trapped their victim in the minimum size, 10' cube, and (2) they concentrated on the spell for 10 minutes, making the stone permanent.
I’m not aware of any rules that would cover suffocation in these conditions, so let’s fall-back on real-world facts. This Friday Fiction Facts: Trapped in an airtight room! article calculates it would take hours]for a person to suffocate in those conditions
“A moderately active or stressed person” would have about 17 hours until they experience symptoms such as “panting, dizziness, severe headache, vision disturbances” at which point we will assume they can not longer effectively chisel at the wall.
The wall is an object made of stone that can be damaged and thus breached. Each panel has AC 15 and 30 hit points per inch of thickness.
At 30 HP/inch times 6 inches, the victim needs to do 180 HP of damage to the AC 15 wall to escape.
Let’s assume our victim is a human commoner with no strength bonus. We’ll even take away their club listed in their stat block, and just give them an improvised weapons, with which they get no attack bonus. Each they can do 1d4 points of damage to the wall if they “hit” with a roll of 15 or higher.
With those assumptions, the commoner’s average damage-per-round would be 0.75 HP. On average (and with this many “rolls,” most attempts would be very close to average) it would take 240 rounds to chisel out.
A round is 6 seconds; there are 600 rounds in an hour, so our mild-mannered commoner can chisel free in 2 and a half hours.
(600 rounds per hour) times (240 rounds) = 2.5 hours for a commoner to escape
So even if we make assumptions that our victim needs to rest three-quarters of the time they still get out with hours to spare.
If you are trapping an armed and dangerous creature, they are likely to be able to escape in even less time.