Important bit is the surface area inside the tube and the internal parts(baffles), simply put more surface area = more effective gas cooling which results in more effective 'silencing'.
Not strictly accurate but the principal is there
The cooling comes from the rapid expansion of the previously compressed gas entering a larger enclosed void (your A/C system in your car works on the same principle)
Conductive gas to solid heat transfer is a very slow process by comparison and whilst your Moderator will heat up eventually it is a by product of the process of trapping the expanding gas.
But the hotter it gets per shot the better job it is doing in containing the gas for longer and thus slowing it down
You want a system that converts the energy of the compressed gas into heat by allowing the gas to expand and slow down,
at the same time restricting the gas' path out of the muzzle, whilst also allowing the bullet to exit unimpeded....
The "more surface area" aspect is baffle design which offers a physical barrier to the gas (and subsequent noise of the gas expanding) and stops or deflects the gas into a chamber rather than directly following the bullet path
The more baffles the better but a few tight baffles are better than loads of slack ones
It also follows that the tighter bore to calibre ratio the less gas can pass between the bullet and baffle -
the less gas escaping at High velocity the better the sound attenuation.