I feel like Minecraft has caused some confusion here. A (steel) pickaxe alone can only break softer rocks in which case you probably need wooden supports so the tunnel does not collapse on you. For example, you would use pickaxes on limestone or shale. Even then it is very difficult and time consuming to break a rock with only pickaxe - you have to hit the cracks and fissures to make progress.
The only way you could actually break rocks with a pickaxe is by first weakening the rock considerably, either with dynamite (which also breaks rocks) or fire-setting. Fire-setting is where you light a fire to make the rock really hot, then you dump water on it to make it crack.
Sometimes with softer rocks you can also use a hammer and wedge to widen cracks before going at it with a pickaxe.
Contrast with a brick wall, which is destroyed 1) by chiseling out the mortar between the bricks and then removing the brick, one by one, or 2) by using the force of a heavy sledgehammer to break the bricks from the mortar.
Siege tunneling is only a valid option when the castle is stupidly built on soft rock like limestone or shale. You wouldn’t actually dig through the castle wall, you dig through the rock underneath it. The tunnel would go all the way from inside the walls to just outside of the range of fire. This process would take weeks with gunpowder. If the castle is made of wood it is infinitely easier to set fire to the castle than dig a tunnel.
Alternatively one could “sap” at the walls, which means you send an army of expendables right up to the wall and start digging under it. The goal of sapping isn’t to make an entry tunnel, it is to undermine the foundation of the wall and therefore cause it to collapse. Sapping is practically suicide as it takes days if not weeks and the defenders can shoot you, or pour oil on you, or drop rocks on you, hence the need for an army of expendables. Sapping was rare until the invention of star forts which are very strong against other siege tactics, and usually built on softer terrain instead of a rocky mountain.