You are the proud parent of a teenager
Essentially every dog goes through this stage some time between 1 and 3 years of age. It can last a week or a few months, depending on the dog. A lot of times the dogs that are so great as puppies get hit the worst, but it's only temporary.
The biggest thing is to not show frustration. Teenagers (regardless of species) are testing boundaries and trying to find their own way in the world... they retaliate to everything even if it makes perfect sense, they pretend to be 'deaf', they embarrass you...
In my experience, the stage lasts longer and often is 'lurking' for years, when the trainer gets frustrated with the dog... that kind of attention is
gold to teens.
Try working on active things that he enjoys, and activities that make him use his brain rather than responding directly to your cues.
Charlie was a wild child as a pup, and I thought he was going to be absolute hell as a teen, but it went pretty well. He was about 1.5 when he hit that stage and I stopped giving any commands that weren't safety related. Instead, I'd just wait him out and ignore him until he did what was expected... for example, he already knew that he should sit before I put his bowl down - when he started his 'teens' I stopped telling him to sit and would leave his food on the counter until I noticed that he was sitting patiently,
then I would praise him and put it down.
By not giving commands I accomplished two things: 1) no bad habits were formed by him thinking about whether or not to respond, 2) he couldn't frustrate me because he couldn't contradict anything I said.
Charlie's stage only lasted a bit over a week before he became eager to be given commands again and have fun.
Conversely, I know a Border Collie that was an amazing puppy and sooo easy (though active and learning different sports). Her owner thought they had breezed by the teen stage, but it hit her real hard around 3 years... it lasted for months, and she was nearly impossible to live with... finally it ended and she went back to being a great dog.
Good luck, lol...