Error loading code into my Arduino

Ok so i am trying to upload the read&write code to my arduino Mega 2560 and every time, the error Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 11738 bytes (4%) of program storage space. Maximum is 253952 bytes.

Global variables use 996 bytes (12%) of dynamic memory, leaving 7196 bytes for local variables. Maximum is 8192 bytes.

An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
and i dont know what it means or why it comes up every time i try to upload the code to my arduino. The code is in the arduino examples tab. Any help is appreciated

(deleted)

I can only guess as there is not much information. I am assuming you are getting Sync errors, 10 of them. Start by checking if you have the correct board selected. Then work with the blink sketch and change the timing so you know it was uploaded and try that. If that works your code should then upload. The statement: Global variables use 996 bytes (12%) of dynamic memory, leaving 7196 bytes for local variables. Maximum is 8192 bytes is output from the compiler, it appears correct. If you have uploaded code previously with print statements you may have flooded the serial output. An indication of this is that the Tx LED is constantly on. Try resetting with the button just as it starts to upload.