Cherry fruit, without stems or seeds, is safe for dogs. But the stems and seeds contain a low concentration of toxins called cyanogenic glycoside (cyanide, essentially). In order for the toxins to be released and to become toxic to a dog, the seeds and stems have to be broken by chewing.
More useful articles on a similar topic 👇
What cherries are bad for dogs?What happens if my dog eats cherries?