Silencers work the same way the muffler on your car does.
It’s a tuned resonant cavity that utilizes internal reflections that are out of phase with the bang and cancel the noise before leaving to the outside world.
I’d say it’s less about phase cancellation and more about slowing the expansion of the gasses.
The suppressor is also trying to cool the gases as quickly as possible,since temperature and volume of gas are linked.