const int button = 26;                       // the number of the pushbutton pin
const int ledpin =  25;                        // the number of the LED pin                                                          // D1(gpio5)int button = 4;                                                           //D2(gpio4)
int buttonState=0;
void setup() {
 pinMode(ledpin, OUTPUT);
 pinMode(button, INPUT);
}
void loop() {
 buttonState=digitalRead(button);                             // put your main code here, to run repeatedly:
 if (buttonState == 1)
 {
 digitalWrite (ledpin, HIGH); 
 delay(200);
 }
 if (buttonState==0)
 {
 digitalWrite(ledpin, LOW); 
 delay(200);
 }
}

Loading
esp32-devkit-c-v4
led1:A
led1:C
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r
r1:1
r1:2