Most people do timeouts wrong. It's not a punishment. It's a few minutes for the kid to calm down and get a do-over.
It goes like this:
1 - warn them "do you need a time out"
2 - give a chance to correct behavior - even if you think he's too young - "3-2-1-TIME OUT!"
3- pick him up and put him in the corner. Sit down next to him. If he tries to leave, pick him up and put him back. "Time out".
The most important thing is to keep your cool. You are NOT punishing him. The poor lil guy just needs some time to cool off. It's hard for kids to make good choices every time. Keep your emotions in check. Wait for him to be ready.
4-time outs at an early age mean a lot of anger and screaming (on the kid's part...let him get it out. you want him to start understanding his own emotions). ask "do you feel angry?" "i feel angry when you _____ _____ ____ _____" You only get 4 words. Don't lecture. Don't grind it into him. "are you done being in time out?" "do you want a hug?"
If your boy is too young even for that.....give him a time out by picking him up and taking him into a different room (diffuse the situation for him) where you let him sit on your lap and tickle him or hug him or sing him a song or ask him if he needs a hug.
OR give his toy (the offending toy) a time out by putting it on the fridge for a few days. "oh no, your ball needs a time out!" "no, your ball isn't supposed to hit my head. It needs a time out until it can remember to not hit my head."
You're accusing the toy instead of accusing him. You're not mad at him. He'll remember not liking missing his toy. but he also won't get defensive.