It’s very normal at this age. As they don’t know how to express things. He’s done it when happy/excited.
Just remove them from the situation. They don't understand "no" even though it becomes their favourite word, lol. If I'm holding my son and he bit, scratch, etc. me, I'd put him down and say "you hurt mama, so mama is leaving". I'd walk away for a minute If it was towards another child, I'd sit him on my lap and hold his hands and say "you hurt your friend so your going to sit with mama for 1 minute before you can go and play".
I had this situation but my LG was the one that got hurt by another little boy. I’m very understanding that kids are kids and things happen and most of the time it’s not intentional especially at this age. BUT what I didn’t accept was the mum doing nothing at all. No apology, no telling her child, didn’t remove him from the situation or do anything to help. Just make sure you have eyes on him all the time if he’s prone to doing it and if it does happen be overly apologetic, remove him, tell him that it’s wrong in whichever way you choose even if he doesn’t understand because it shows that you don’t condone that behaviour and as someone who’s been on the receiving end that’s all I can ask
Has he started to bite ? That’s when I would really worry.