How do you deal when your kid doesn't listen?

So I have 6yo son and he's really smart. However if I was telling him to do smth and explain why he had to do, he would usually do if it made sense to him. Now, no matter what I ask, if I ask nicely, he says no just for the sake of it, and then proceeds to do but pretends he doesn't know how to do and asks million questions about it and if he can do smth wrong, he does it wrong and then acts surprised. But if I had enough with kind explanations or soft-speaking and I just yell at him to do, he does it quickly and flawless. Like he just gets the things done efficiently if I yell but if I won't, he keeps playing dumb.

I don't wanna be a yelling mom though and I don't want him to get used to yelling but he just doesn't listen when I ask nicely.

What phase is that? How do you deal with stuff like this?
How do you deal when your kid doesn't listen?
Post Opinion