You described the Arduino board you are uploading to as "Uno". Something that can be confusing is there are multiple boards with "UNO" in their name. We need to be certain of exactly which one you have. The reason is that the problem might be caused by the IDE not being correctly configured for your specific board.
Please tell us which of the following boards you are attempting to upload to:
- UNO (R1, R2, R3) or Uno Mini
- This includes clone/derivative boards as long as they have the ATmega328P microcontroller.
- UNO R4 Minima
- UNO R4 WiFi
- UNO WiFi
- UNO WiFi Rev2
- ...or something else?