buzzer does not work with distance sensor hc-sr04

Try using pin 9 to connect to your LED and buzzer.
Make all the changes to your sketch to use pin 9.

If pin 9 works and pin 10 doesn't, you need to get a new controller chip.
(buy several as you never know when you might damage one)