Anchoring in rocky terrain can be a little tricky. As you swing around on your chain it can get itself wrapped around rocks like some sort of Chinese puzzle trap.
In this situation the thing you most need is the ability to see the bottom and the anchor chain. It makes it much easier to understand how you need to dance with your boat to “Unwind” the chain wraps.
If you can do this, then use someone, possibly in the water if they need to dive to get a clear view, helping you rotate the boat in the desired direction to pull your chain away from the rock that you are hooked on.
The trick is not to pull back on the chain at all if possible but slowly unwind it, bit by bit, leaving it laying on the floor for the next bit that needs to be pulled to a different angle, until you can pull the chain up clear of the Rock.
If you pull back on it, you may well set it into the rock, pulling it under the rock or jamming it into a crevice between rocks that will make getting it back out quite difficult.
So unwind carefully with the chain on the ground as it is pulled around the rock, until free and then raise that bit up and move on to the next section that needs a different angle to free.
Much much easier in gentle winds it requires you to use the motor to keep the pressure off the chain if there is wind to contend with. As long as there is pressure on the chain, it may never release from the rock and will possibly dig deeper underneath.