so one of the ones that is helpful for carpel tunnel is pulling your thumb backward toward your body. Kinda pull and hold for a few seconds.
Then do something similar for the pinky for the ulnar. If one of those is providing better relief than the other that can help give your answer for which it is, then as I said earlier, make sure to keep the wrist straight for carpel tunnel, elbow straight for ulnar.
I can't seem to find the video of the wrist exercises that I like the most, but I did find some pictures of a few:
Also having your arm out straight in front of you and just open and closing a fist slowly is good, do it 5-10 times with your palm facing down and then 5-10 times palm facing up, for each hand.