Welcome to HCM.
I presume you got hit in the right eye. Pupils react to the intensity of light falling on it. If the light becomes brighter it will become smaller to control the amount of light passing through, on the other hand if the light incident on the pupil is much less, it will dilate to allow more light to pass through.
It is quite common to get a constricted pupil when it is subjected to blunt trauma
. This will gradually settle down and it will take up it's normal function.
If there is no injury
to the eye, this need not be of a great concern, but if there is injury to the eye, however minor, it needs immediate medical attention.
Wish you all the best.