Correct port selected?
Did it work in the past?
What is all connected to the board? Anything on pins 0 and/or 1?
Please enable show verbose output during upload under file -> preferences in the IDE; please keep Show verbose output during compilation disabled.
Attempt an upload and copy the full error message here (use the copy error messages button in the orange bar in the IDE); please use code tags (the 'circled' button in below image)
YES PORT IS CORRECT
YES WORKED IN PAST BUT FROM SOME DAYS SOMETIMES UPLOADED SOMETIMES NOT
NOTHING CONNECTED TO BOARD NOW BUT PREVIOSLY MOTOR SHIELD CONNECTED AND WORKED FINE
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\NEERAJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Yes, port is correct
-Yes, worked in past
-Nothing connected to board
This is the error message with verbose output during upload ticked and verbose output during compilation unticked
Arduino: 1.8.15 (Windows 10), Board: "Arduino Uno"
Sketch uses 1928 bytes (5%) of program storage space. Maximum is 32256 bytes.
Global variables use 192 bytes (9%) of dynamic memory, leaving 1856 bytes for local variables. Maximum is 2048 bytes.
C:\Users\NEERAJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\NEERAJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\NEERAJ\AppData\Local\Temp\arduino_build_1248/timer.ino.hex:i
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\NEERAJ\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
An error occurred while uploading the sketch
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Do you know which TTL-to-USB converter is on your board? If the board does not have the CH340 TTL-to-USB converter, have you tried the Loop-Back Test Instructions? What is / was the result?
Is there anuthing in Windows device manager indicating a problem?
You can also find relevant information about the TTL-to-USB converter in device manager. Right click on the device and select properties. Below are two possibilities but there are a few more.
Uno with 16U2 TTL-to-USB converter
Uno with CH340 TTL-to-USB converter
You can also navigate to the details tab in above images (in case it shows as unknown device), select Hardware Ids and find the VID and the PID; those can be used to determine the chip and hence the needed driver. Below is for the CH340; if you have the CH340, the loopback test is non-conclusive as it will always fail.
Your board has a 16U2 so the loopback test should work.
Two possible conclusions in my opinion
Driver issue; have you tried to reinstall the driver?
The 16U2 is (partially) malfunctioning. You can try to burn the firmware of the 16U2 (not the 328P) using Atmel flip (never done it so can't advise) and see if it solves the issue.