Here is something you can if you have a dog and kids, if you have a dog and visiting kids, if you have kids who may have friends who have a dog or family members who have a dog...
www.thefamilydog.com/stop-the-77 - yes, it is american based but yes its still applicable here and a really useful resource.
What else can you do.
If you have a dog - learn about dog behaviour/body language basics from a reputable source (hint, social media videos featuring people with dogs on prong collars or shock collars or tight slip leads probably aren't reputable sources) A great book for everyone, kids and adults is Lili Chin's Doggie Language www.amazon.co.uk/Doggie-Language-Lovers-Understanding-Friend/dp/1787837017
If you DON'T have a dog but your kid is likely to come across dogs and does not live in a bubble... still get that book, ask your library for it if you don't want to pay.
If your kids are not old enough to read the above book, then teach your kids NOT to expect to, or ask, to stroke strangers dogs. The old advice was to ask the owner, I would no longer do that as many owners will not recognise the signs that their dog is uncomfortable, and many dogs ARE uncomfortable when trapped on a lead or in a tight space! No need to teach them that dogs are nasty or dangerous, just teach them that the DOG may not like it, may be scared or uncomfortable.
If you have a dog - this is really important as little kids often assume all dogs are like their dog and so they can run up, grab, hug, kiss etc etc, and theres a strong chance their own dog is only just tolerating this, so a strangers dog may REALLY object, particularly if startled.
When kids are old enough to read some about dog body language, teach them to ask the owner, THEN if the owner says yes, ask the dog - getting the message through that the owner may say yes, but the dog may still say no.
Greeting a dog - don't stand rigid and stare at the dog and stick your hand out, or reach out and grab. Stand sideways on, or sit (if in a room with seats!) or squat if you're stable and can do that without wobbling and it doesn't put your head at dog head height, and invite casually, and scritch the chest or shoulder IF the dog approaches and asks for contact (Which you'll know if you read the book).
Teach kids they touch dogs with ONE hand only, never two hands on the dog, this is an easy way to stop full on both arms around the dog hugging.
If your kids are going to other peoples homes, ask if they have a dog, ask to meet the dog first - if they don't want to do that or are wary or you don't like how the dog behaves (or how they behave around the dog, or how their kid does), no play dates there.
Watch out for people who order their dog around by yelling and pointing or hitting and dragging - dogs may tolerate this sort of behaviour from domineering adults, because they fear the repercussions, theres a history of fear and punishment associated with those adults. They don't dare.
However when little kids emulate that behaviour they've seen from the adults, and there is no adult present... the dog still associates this context with nasty shit happening but doesn't quite have that 'I don't dare' association... and so reacts to defend themselves... with dire and tragic consequences.
Theres more but I'd be here all week!