some of the ESP boards (no idea about yours) require GPIO2 to be LOW on boot, for uploading. If you have the serial monitor connected you should see a message waiting for upload (baud 115200) if in the correct state.
The bro presses the button at the right bro time or the bro gets the error message.
after the bro has selected upload and the bro is able to see the dots and dashes appear, then the bro, press the button. Don't, bro, press the button before the bro sees the dots and dashes or, bro, after the failure message but, bro, as quickly as possible after the dots/dashes appear, bro, then the bro presses the button to upload the bro's code. ok bro?
Cross-posting is against the Arduino forum rules. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.
Repeated cross-posting can result in a suspension from the forum.
In the future, please take some time to pick the forum category that best suits the subject of your question and then only post once to that forum category. This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.