About timing: dogs are fairly transparent. If they're looking at something, they're thinking about that thing.
If their ears prick, they're thinking about chasing it.
If the muscles in their shoulders tense, they're about to chase it.
By the time they're actually chasing it, you've missed at...
Basic obedience training helps more than people think, because it teaches a dog to focus on YOU.
So, start with basic training. Then, when the dog is getting the concept that your voice is a thing that must be paid attention to, teach the command "Leave It"
Leave It means; take your attention...