Mud tyres work in mud mainly because of the "bars" on the side walls, once any tyre treads are full with mud they will spin.
getting out of a stuck situation, depends on where, and who is around to help you.
Often just the push from a passenger is enough to get some momentum, but I find "Keep going" is the trick, once you are moving, don't slow down as a couple of tons of momentum stops you getting stuck in the first place.
Then if you are stuck, don't spin the wheels as you just drop deeper into a hole that is even more difficult to climb out of, rocking back and forwards definitely works. I once spent a hour getting out of sand and going back and forwards without spinning flattened out the hole until I had enough momentum to keep going and ride up out of the hole.
If you are in holes, on your own, you need to fill each side of the tyres with "Stuff" and then continue the back/forwards method into you ride up over it using the "Stuff" for extra grip, then keep going until you are on firm ground and then walk back for your gear. If you have a compressor onboard, then drop the tyre pressures down to 1 Bar.