In most cases, you don't need to wait at all but this depends on the dewormer medication.Many common dog worm treatment can be given with food or immediately or after a meal. In fact, giving them with food can help reduce the chance of an upset stomach or dog unwell after worming tablet. Some worming treatments have specific instructions like Itch Worming tablets for dogs suggest you give the dewormer pill with food, so it's best to follow the directions on the packaging or from your vet.
If your dog has vomited shortly after taking the dewormer (especially within 1–2 hours), contact your vet, as they can advise whether another dose is needed.
Mild side effects such as a temporary decrease in appetite, loose stools, or seeing worms in the stool for a day or two can be normal after deworming. However, if your dog has persistent vomiting, severe diarrhoea, lethargy, or other concerning symptoms, contact your vet.