1. make an appointment with a bike-friendly Physio - NHS do some great ones
2. place hands in a bowl of hot/warm water & tilt wrists backwards and gently extend and spread fingers.
Do not persist against pain.
3. in case of pain/restrictions relax to the maximum available then relax further into the exercise.
This part involves some mental control.
Any case of claw hands needs early investigation and expert help - there might be something about the bike position that is not causing the problem, but which is triggering an underlying condition.