The Fourth of July always brings us warnings about keeping dogs indoors, because many of them are terrified of fireworks. It's the loud sounds that spark their fear, which you might also notice during thunderstorms. But some dogs are so nonchalant about booming noises that they can carry out their duties during a bomb attack or open warfare. What makes the difference between the two types of canine reactions?
Dogs that have little to no negative associations with loud sounds can still be found cowering during a storm, while others who had a scary early experience can learn, often through counterconditioning and desensitization, to overcome the fright. One explanation for this can be found in temperament. Unlike personality and mood, which are more fluid emotional states, temperament is a deeper, more hardwired system affected by genetics and early development. Temperament is shaped by epigenetics, or the way an animal’s genes are influenced by external factors, and this can play a significant role in the dogs’ inherent predisposition to stress, anxiety and fear.
For example, studies in humans and animals show that mothers who experience high levels of stress during pregnancy can pass on a propensity for anxiety to their young via the stress hormone cortisol. When signaled by a stress-inducing event, the brain’s hypothalamic-pituitary-adrenal axis (HPA) becomes active and produces cortisol, which then travels throughout the body keeping an individual on “high alert.” High cortisol levels in the mother’s bloodstream have subsequent negative effects on the developing baby, or in this case, puppy.
But that's just one factor. There are quite a few others that can determine how a dog reacts to fireworks, which you can read about at Smithsonian. They also have a technique you can try to help your dog become less fearful.