First, I always make sure that my pets all pets are wearing well-fitted collars have and ID tags, some way that serves to ID them, because these loud noises can frighten dogs so much that they run off.
I always bring my dogs inside on days that I know there'll be fireworks, like New Years or Fourth of July. I put them in their crates with a comfortable mattress and their favorite toys.
Joey loves music, so I put some music on for them and shut the windows to drown out the noises outside. I dim the lights a bit or put a blanket over their crate (not completely covering it so they can still see their surroundings). I make sure they're in a comfortable environment.
Lastly, I don't reinforce their fear. Instead of making these fireworks noises feel like a big scary deal, I don't make a big fuss about it or coddle them. Instead I play with them like it's a regular day and keep them distracted. Animals, like dogs, can feel our emotions and will imitate them; if one is anxious our dog can also get anxious. So it's important for us to stay in control and calm.