As for spots in Brooklyn, lots of people go to Coney Island/Brighton Beach for the 4th. I'll warn you it gets a bit crowded. As for seeing fireworks on the East River, I'd suggest maybe checking out Franklin D Roosevelt Park on Roosevelt Island or maybe Gantry Plaza State Park (Long Island City). It could also be fun to check out a rooftop bar. However, these are typically ticketed, so get tickets in advance. And make sure that the rooftop is high enough so that the view is not blocked by other buildings.
If you're willing to travel a bit, I'd recommend maybe Rockaway Beach/Jacob Riis Park. Or if you want to check out the LGBTQ+ scene, Fire Island is fun.