I realise I am a day behind with this question -so hope your puppy is okay?
There is no harm in fasting for 24 hours with water only -r an electrolyte fluid such as Pedialyte. If you don't have that, then water with some honey or maple syrup dissolved and maybe the tiniest pinch of sea salt (the tiniest!)
then after that, doing the usual for a mildly upset tummy : plain boiled rice and see if that stays down. If so, intorduce plain boiled chicken as well. If there is no more vomiting or diarrhea, gradually introduce normal food over the course of a couple of days.
Keep a watch to make sure the vomiting doesn't return. If so your pup needs to see the vet.
BUT it is really important that your puppy drinks AND KEEPS DOWN WATER. If there is more vomiting while drinking water only, then a trip to the emergency vet is the best thing to do as dehydration is a danger. Pup will need an IV of fluids and electrolytes.
This could just be a simple upset tummy, or it could be something more serious. Can you take your pup's rectal temperature? The normal temp. should be around 101 degrees or maybe a little over. Around 102 or above -that's a fever. Below 100 is also worrisome. If there is a fever go to the vet immediately.