I have an Arduino NANO however when I try to upload code I says "uploading..." then it gives me this error:
Sketch uses 444 bytes (1%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\.\COM4": The semaphore timeout period has expired.
Are you sure your Arduino Nano (classic) is on COM4? It appears that something prevents the IDE from opening COM4. Try re-starting your PC before trying again.
There are versions of the Nano around that use a different USB chip and the "old bootloader". Under tools\processor try selecting the old bootloader option and see if that works. The first 3 Nanos I bought were from Elegoo and they needed this, the second lot was also from Elegoo but they needed the standard bootloader.