This looks like sensory-seeking. Give the same input in safe forms, on a schedule rather than waiting for the behaviour: kinetic sand, thera-putty (digging fingers, rolling, squeezing), texture play with rice and dals, kneading atta, joint compressions, and full-body massage followed by an Epsom-salt bath. If hands stay idle, keep a fidget/putty basket within reach. An occupational therapist can design a “sensory diet” so his body gets enough input across the day. See a doctor promptly if he’s causing bleeding, swelling, or injuries.
Disclaimer: This is general information shared for parent awareness, not medical advice. Every child is different — please confirm decisions with your child's doctor or a qualified, RCI-registered professional.