He's too young to have good control or to have the whole thing down pat. I crate-trained Tibbe for months just to be sure he had no chance to have accidents and had a good foundation of training & when he could expect to be taken outside. If I left the room or had to run an errand, he went in the crate. Otherwise, he was out in the house being taken outside very frequently, kept on a very regular schedule so he could come to anticipate he would get a potty break after crating, napping/sleeping, eating/drinking, play periods, grooming, cuddling periods, visitors arriving or leaving or any period of intense excitement, etc. After a successful trip outside, he was praised/rewarded for positive results & if he didn't go after 10 minutes outside, he was brought in, watched like a hawk for signs he was needing to go whenever he wasn't crated and taken out again at the first sign. Soon he learned that if he held it, that given one of those schedule triggers, he would be taken outside.
If your little one is having accidents in the house, you need to take him out more often and/or watch him more closely for signs he needs to go & restrain him in a crated/fenced area with pads when you can't be watching so he can't have these accident - and be prepared to do this for months if you want a good long lasting training foundation. Just resign yourself that good housebreaking of a Yorkie is going to take a while, is a lot of work & accept it with a patient smile. It won't last forever - just seems like it does at the time!

After all my & Tibbe's hard work at housebreaking, he's now clean in the house - except when he is ill. Good luck!