When you have a 2 year old child that does not listen and you need to discipline the 2 year old you should put the 2 year old in a time out chair.
Tell the 2 year old child sternly that they are not to move out of that spot or they will get a spanking.
It's perfectly fine to spank a child of even 2 years old if they won't listen.
Spanking does really work as I've been spanked as a 2 year old and as a child and I turned out good.
I'm glad my parents spanked me as I really needed it and they spanked me out of love and not for harming me.
The 2 year old needs to know who is the boss and who is in charge or as they get older they will get even more out of control.
You can also place the 2 year old in their room and tell them to not come out of the room until you say they can.
Take toys, TV etc away from them until they listen.
Sometimes when a 2 year old is having a tantrum and not listening to you sometimes walking away and ignoring them can help them calm down and listen.
Tell them they are not able to do something that you had planned to do or they were looking forward too.