Hello. When a bruised or otherwise injured nerve heals, it often heals incompletely or in a dysfunctional way. This can predispose the nerve to further injury or firing inappropriately when it is struck even in minor incidents such as you describe.
In such a case, however, we would not expect the pain to last very long. The myelin sheath around the nerve (it's insulation) may simply need to be repaired to stabilize the nerve
What part of the hand hurts? And do you have any weakness in the wrist or hand?
More the back of the hand or the palm side?
That would be the radial nerve. You likely have a sensory neuropraxia.
Neuropraxia is a type of peripheral nerve injury, and is known as the mildest form of nerve injury. It is classified as a transient conduction block of motor or sensory function without nerve degeneration.
Full recovery in the case of neuropraxia (within a period of weeks to months) is the rule.
If there was no obvious injury, you would have to consider a tendonitis or tenosynovitis of the thumb and finger tendons.
This is pretty common in those who do a lot of fine motor tasks with the thumb and forefinger, including computer work.
That could have caused a traction injury of the nerve or the tendon.
Either way, the treatment is rest, ice 3-4x per day, and an anti-inflammatory 3-4x per day.
Sometimes a wrist splint can be very helpful in stabilizing the wrist so that further energy does not go into the nerve or tendon while it is trying to heal.
You're welcome. Hope all works out for the best.