avrdude: stk500_getsync(): not in sync: resp=0x00

Help me!
I tried uploading code (I know this error has nothing to do with the code, but anyway) and it didn't work! Instead, I got this error:

avrdude: stk500_getsync(): not in sync: resp=0x00

I made sure the right board was selected (Arduino Uno) and COM port (COM 4) but it still didn't work!
Can anyone help me?

(deleted)