As above with settings. There is also another technique that can give a nice effect, that is to set the camera on a tripod and set a long exposure, say 30 seconds, cover the lens with a black (or dark) cloth or a hat, then as the fireworks start, press the shutter button, remove the cover from the lens and then recover after a few seconds. You can do this 2 or 3 times to capture more fireworks in the same exposure. It also works for lightning storms.