Jaws is one of the most iconic summer films of all time, and its filming locations add to its appeal. To tell the story of Bruce, the killer great white shark, and how he terrorized a whole town one summer, Steven Spielberg set the story in a beach town. While the United States has an abundance of beaches from California to South Carolina, Spielberg's film was set in the northeast. This allowed the film to have a small-town feel to it, and since small towns are typically known to be safer with less excitement than big cities, the shark attacks really rocked the characters' world.
https://screenrant.com/jaws-filming-locations-marthas-vineyard-explained/