Apparently this is good and part of their development. My 2 months old girl is doing the same. We just make sure her hands are cleaned frequently and nails kept short. If it get worse, we are thinking of introducing a dummy for night time.
My 15 week old loves sucking his hands at night to get to sleep. During the day I let him chew/suck a muslin but only when I’m there is case it ends up over his head. Annoyingly he categorically won’t take the dummy!
I think you just need to let him learn on his own. But there are sensory wristbands you can get which help with their hand-eye coordination... Not sure if they work.