buzzer does not work with distance sensor hc-sr04

resistor is a must to connect with led?

what you mean by make pin 10 an output?
connect to buzzer or change LOW to HIGH from code?