Start with a comfortable setup and simple movements that let you focus on the sound you are making.
Start with comfort and control
Adjust your position
Sit where your arms can reach the keys without crowding your body. Keep your shoulders at ease and your feet supported where possible.
Play a short pattern gently
Use a few neighboring notes. Listen for an even sound and notice whether you are holding tension after each note.
Pause and reset
Take your hands off the keys between attempts. If a motion hurts, stop instead of practicing through pain and ask for qualified guidance.
Technique is how you move to produce a musical result. Hand shape and movement vary with the player and the passage. A teacher who can see and hear you can give more useful guidance than a rigid rule applied to every hand.