This stage is hard. You're tired and pushed to the edge, sometimes you snap and shout. This is a really difficult age at times.
Also you're only 2 years into parenting (if this is your first). Every day is a learning day as a parent and you will get better strategies and coping mechanisms.
If you want to read any books there are a few that give some good advice - how to talk so little kids will listen can be useful for some ideas and to remind you that lots of parents find this hard and come across the same issues.
I struggle with anger and my temper at times with my young children. Some of my coping techniques:
Ignore what you can. If it doesn't matter in the big picture, just leave it be. Give them a row for the big things (physical stuff etc)
Walk away if you can and try to calm down before addressing it.
Use an overly happy or friendly tone and make a game of things. 'Oh deary me, there's raisins everywhere! Right let's see how quickly we can get them all picked up and count them. GO!'
Try not to let other things influence how you speak to the kids. I'm dreadful for this. If I'm pissed off at DH, running late, worried about work or the world or whatever, it comes out as snapping at the kids over something trivial. Im trying to recognise this and deal with it.
That's just off the top of my head. There are lots of ways to manage small children effectively but in the heat of the moment it can be really hard.