Dealing with fireworks through the lens is fun. You need patience and perseverance to get a good shot. Light is a subject.
Treat it, that way with a different way of thinking about how you use the camera because fireworks create their own exposure.
A long exposure is required to let a few fireworks trace out their patterns and form a shape of its own.
The brightness of the surroundings will be affected by your ISO and Aperture settings.

For this shot, I used ISO – 100 with 4seconds at F10/ 2.8 Av.

I use many tips for fireworks:
I will explain one of the techniques I use often which will help the first time fireworks shooters.
_________________________________________________
I don’t shoot for the first few minutes /atleast.. 10-15 fire works bursts.
I calculate the time with a stop watch that how many seconds it takes for a firework to reach to the sky from the bottom to form a pattern.
Always I look at the bottom of the stage where people are triggering the fire work.
When I see a fire work is triggered then I switch on the stop watch in my iPhone to calculate the timing for few bursts.
For Canada place usually, it is 3-4 seconds on that day from where I was standing.

When I see a burst and I leave a second and then I open my shutter between 3-4 seconds to capture different formations.
Note down, when you click the shutter and how long you expose the light subject is the key for success.

Questions and Clarifications are welcome.