You can buy whatever you want - subject to Federal guidelines (oddly no bottle rockets) - for the week of the 4th and New Years. Then they are illegal again. So the noise is limited.
The cities can have their own ordinances which are generally ignored.
I live in a large liberal city where fireworks for the prols is verboten. I appreciate that even in this liberal mecca there is a streak of rebellion among the populace. All around the 4th of July in the early evening you hear the “swoosh, BANG” and “screeee, BOOM” of fireworks going off in the city. It gives me a bit of hope that there are still those who will stand up and ignore the authorities.