Do you mean you used the Uno as an "Arduino as ISP" programmer to do an Upload Using Programmer? If so, when you did that you erased the bootloader. This error is normal and expected when attempting to upload to a board without a bootloader. You need to connect the Uno back up as an "Arduino as ISP" and do a Tools > Burn Bootloader to restore the bootloader. After that, you will be able to upload to the Mega normally via the USB cable once more.
1 Like