It's most likely due to you having a bent wrist when squatting, focus on rolling the wrist forward so the wrist doesn't carry the load. It can also be due to poor wrist position in bench or press. If its still sore after 2 weeks maybe you strained a tendon.
Ibuprofen, rest and lift with correct wrist position.