Probably you could havd strained a muscle or a ligament. Cause would be faulty posture during workout.
Next Steps
apply ice if swelling persists and avoid all exercises which load your wrist.
consult a physio if the pain does not relieve in 10 days
Health Tips
can you a wrist band when you resume exercises after the pain subsides