Won't Synch

I have successfully compiled 3 sketches-I think. Then, after about 2 minutes an error message appears:

error message:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x5c

Arduino: 1.8.11 (Windows 10), Board: "Arduino Uno"

I have tried changing boards-Uno & Nano. Pins 1&2 are free, removed all wires from board. I have checked Com ports, OK.

Please help find what’s not in synch

Well, did you actually even change the board to "nano"?
If yes, then try swapping your cable for another one, it may be faulty.

The error means it can't contact with your Arduino.
I had the same error (In the sense "not in sync", the numbers and all other stuff are sometimes different)
millions of times. Mainly its due to improper "setting up" of software or hardware. Once I had even burned
my UNO's ATmega328p. But that was resp0x00, if I remember correctly.

Which board? You mentioned two in your opening post.

If it's a nano, try the old boot loader option under tools -> processor.

Changed cables, both boards, no good. Error message now resp=0xe0

Read where code may be in wrong text for compiler. The project code I got from Utube. I first copied them in Libre Text. Then with the error message I wrote them out in Notepad. Finally, I copied them directly into Sketch, all to no avail.

I verified and tried uploading a sketch I know to be good-it's working fine at this moment.

error message this time: resp= 0xid