Sorry to hear your puppy is not feeling well. Due to his age, it can be any number of things. Does he chew on stuff a lot? Any chance he has ingested something? Is he up to date on his vaccines? Has he been checked for parasites and treated? Have you switched foods, etc? Could be a virus.........
I would withhold all for for 24 hrs, just make sure he is drinking enough fluids. Reintroduce some small meals of maybe boiled chicken and some rice (preferably brown rice) and see how that goes. If the diarrhea gets worse and/or he also starts vomiting, then you would be best to get him into see your Vet and take a fresh stool sample with you.
Yes the thing is with vomiting and diarrhea (in the absence of fever) to withhold all food for a day. But do make sure he drinks plenty, to prevent dehydration setting in.
Dogs do get these tummy upsets from time to time, and very often it's a passing thing. But of course it's hard to be sure what causes their upset.
Sometimes when the owner swears they have not given any unsuitable food to eat, the dog can occasionally have got hold of something which has upset them. I once was walking in the street with my other dog, he stopped to sniff, and I was talking to a friend. When I glanced back, there he was snaffling half a bar of chocolate someone had dropped!
Once the dog I have now suffered a bad tummy upset one night. When I looked at what she had vomited, there was totally unsuitable food I hadn't given her! I found out that my friend had given it to her unknown to me! (I talked to him, and he never did that again)
You see, things like that can occasionally happen.
But of course, the cause of vomiting and diarrhea can be any number of things. Margot's advice is sound.