Ardunio Nano ATmega328p problem uploading code

Try a different USB cable.

Avoid USB 3.0 ports.

Remove anything connected to the NANO

What sketch did you upload before this one ?

Which version IDE ?

Clone or true NANO ?