When the IDE reports the memory usage, double tap the reset button. That should invoke the bootloader; you can check it in Windows device manager and you should get a slow fading LED on the board.
Use an innocent sketch like blink. When you check in Windows device manager, the port should change; please write down the new port number.
You can enable verbose output during upload and upload a code (e g blink). After a failed upload, right click in the output window and click copy all. Next paste in a reply here.
There are a few reason why it can fail. Problem in the IDE is one, bug in your sketch is another one (hence the use of blink).
Once you can consistently upload blink a number of times without the double tap, you know that the problem is in the last sketch that you did upload. If you always have to use the double tap trick, you know that it's the IDE that is giving you grief.