Friend, vomiting can be caused by many different medical conditions. It will be difficult for me to determine the exact underlying cause without a hands-on examination and some testing, I am sorry. But, in a puppy, common causes are dietary indiscretion, intestinal parasites, ingestion of a foreign body, infections, etc. to name a few causes. The fact that they have a history of getting in the trash we strongly need to consider the possibility of a foreign body in the intestinal tract. I am going to make some recommendations below, but, I am also going to strongly recommend a hands-on examination with your family veterinarian. If possible, I would have them checked today. In the meantime, this is what you can do:
1- Do not give things like Pepto Bismol or Imodium. Give them 1-2 teaspoon of honey, karo or pancake syrup directly into their mouth to avoid hypoglycemia (low blood sugar).
2- No food or water for 2-3 hours. Need to give their gastrointestinal tract time to rest.
3- After 2-3 hours offer a small amount of water. Wait half hour, if no vomiting, offer a small amount of rice (50%) and boiled boneless chicken or ground beef (50%) 4-6 times a day.
4- Follow up with your family veterinarian for a hands on examination.
My goal is to provide you with excellent service - I hope I've provided the information you were seeking, if you feel you have received anything less, please reply back as I am happy to address follow-up questions. Kindly rate me when you are done.