How to rotate an object with two fingers on mobile?

Hello,
I want to rotate an object with two fingers, one finger stays pressed while the other moves on the screen in the direction of the desired rotation.
I manage to have the two codes that work thanks to a gesture rotation but it works one by one, if I connect the two they do not work (from what I understood, the gesture rotation input only manages one axis of movement (recognition of finger movement).
I think I would need a system that detects if I move my finger in X or Y and follow the code accordingly.

Thanks!