buzzer does not work with distance sensor hc-sr04

digitalWrite(10,LOW);
You are trying to make this pin LOW but you have not made this pin an output.
Do this in setup.