Notejode we can see lots of examples from the last week. There are a couple ways.
First, protesters can directly stop looters. There are lots of videos out there where protesters are telling people to stop looting or being violent, even cases where they detain looters and turn them over to the police. Protesters standing in front of shops so they can't be looted.
If the streets are full of people protesting peacefully, there is less space for looters to operate. If the streets are empty because of curfew and the police are off chasing protesters, then it is really easy for looters to run amok.
Second, community leaders have a lot of influence. All over the US, we have seen respected voices in a community urging young people to stay home and not cause trouble. Their words are more likely to have an effect if the police are not escalating matters.
Will this stop all the violence? No, but it can massively reduce it. Again, we are not seeing these problems everywhere in the US. Some cities are doing it right.