Put mustard on it or something that tastes bad.
I suggest you apply mustard or something unpalatable to your child's hands to help him overcome the habit of eating his fingers.
Eat more fruit
Such as calcium deficiency and zinc deficiency. It is suggested to eat more fruits and some oral liquids to supplement trace elements.
Consult a doctor
I'm afraid your child's intestinal infection is also closely related to these two bad habits. I suggest you go to children's hospital to consult a doctor. It will be safer. After all, you are only two years old and still very fragile.