I am sorry to hear you are worried about your Yorkie. My name is Rebecca. I am a veterinarian and will do my best to help.
This could have been an episode of low blood sugar, which we see in small breed young dogs. If it happens again, try putting Karo syrup or honey on his gums and see if that helps at all.
It could have been a seizure, and seizures are caused by many things: low blood sugar, an irregular heart beat, low thyroid, epilepsy, a condition called liver shunt, water on the brain (hydrocephalus), Yorkie encephalitis. If it was a seizure, it is common for the dog to look normal by the time you get to the vet.
Sometimes a dog has an episode like this, and it never happens again and I hope that is the case with your dog. If it does happen again, I would start with some blood tests to check for low blood sugar, liver disease, low thyroid, etc.
Let me know what else I can answer or help with. Rebecca