An error occurred while uploading the sketch avrdude: stk500_getsync()

When I upload my sketch, arduino IDE throws an error,

Arduino: 1.8.11 (Windows 10), Board: "Arduino Uno"

Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
An error occurred while uploading the sketch
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x20

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I have selected a correct Board and Correct COM port and have also tried to reinstall the IDE nad had also reffered various forums, but none of them worked for me. Any help will be apperitiated!!

Remove any connections to pins 0 and 1 on your Arduino board. These pins are used for communication with your computer, including uploads. Connecting anything to these pins can interfere with uploads.

OMG, Thanks. Tell me how did you figured it out!!!!

You're welcome.

Pins 0 and 1 on your Uno are also used for communication with the computer over USB, including Serial Monitor and uploading. Connecting anything to those pins can interfere with the communication with the computer. It's recommended to avoid using those pins if possible.

Enjoy!
Per