Arduino Uno stuck on upload

Try this:

Connect your "Arduino as ISP" Uno to the bad Uno, with the usual wiring.

Connect the "Arduino as ISP" Uno's USB cable to your computer.

Paste the following sketch into the Arduino IDE:

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("hello");
  delay(1000);
}

Tools > Port > select the port of your "Arduino as ISP" Uno

Sketch > Upload Using Programmer

Wait for the upload to finish successfully.

Unplug the "Arduino as ISP" Uno from your computer.

Disconnect the "Arduino as ISP" Uno from the bad Uno.

Connect the bad Uno's USB cable to your computer.

Tools > Port > select the port of your bad Uno

Tools > Serial Monitor

Make sure the baud rate menu near the bottom right corner of the Serial Monitor window is set to 9600.

Do you see "Hello" printed repeatedly in the Serial Monitor? The idea is to see if serial communication is working correctly all the way through between the ATmega328P to the ATmega16U2 to the computer.

NOTE: when you did the "Upload Using Programmer", it erased the bootloader from the bad Uno, which will make it so you can't upload sketches over the USB cable. You can replace the bootloader by connecting the "Arduino as ISP" back to the bad Uno and doing a Tools > Burn Bootloader.