Esp32 digitalRead get LOW level

Hello. I try to get low level from pin. my code:

int pwmPin = 27;


void setup() {
  Serial.begin(115200);
                            
  pinMode(pwmPin, OUTPUT);      

  pinMode(35, INPUT); 
  


digitalWrite(pwmPin, HIGH);
digitalWrite(35, HIGH);

}

int getData = -1;

void loop() {


  getData = digitalRead(35);
delay(101);

  Serial.print ("Get data: ");
  Serial.println (getData);


   if (Serial.available ())
  {

    String getCmdSerial = Serial.readString();

    if (getCmdSerial == "test")
    {

      Serial.println("Try make impulse");

 digitalWrite(pwmPin, LOW);


  delay(101); 

  digitalWrite(pwmPin, HIGH);

    }
    } 

}

but after I upload the sketch in Serial monitoring I get:

Please, help, what is wrong? Thanks

what is connected to IO-pin 35?
If you have configured an IO-pin as input

digitalWrite(35, HIGH);

makes no sense
You have to connect the IO-pin to either 3.3V to get a HIGH
or
to GND to get a LOW

Your code is awful formattet = not formatted it should look like this

int pwmPin = 27;
int getData = -1;

const byte myInputPin = 35;

void setup() {
  Serial.begin(115200);

  pinMode(pwmPin, OUTPUT);

  pinMode(myInputPin, INPUT);
  //pinMode(myInputPin, INPUT_PULLUP);

  digitalWrite(pwmPin, HIGH);
  //digitalWrite(myInputPin, HIGH);
}


void loop() {

  getData = digitalRead(35);
  delay(101);

  Serial.print ("Get data: ");
  Serial.println (getData);

  if (Serial.available ()) {
    String getCmdSerial = Serial.readString();

    if (getCmdSerial == "test") {
      Serial.println("Try make impulse");
      digitalWrite(pwmPin, LOW);
      delay(101);

      digitalWrite(pwmPin, HIGH);
    }
  }
}

If you configure an IO-pin as input and have a wire connected to that IO-pin

pinMode(myInputPin, INPUT);

This means this IO-pin is super-sensitive to electromagnetic noise
You would have to connect it to GND to get a low

best regards Stefan

What's connected to pin 35?

If nothing is connected it will float to an undefined level and may read high or low.

I'm not sure if INPUT-PULLUP works on the ESP32 but if so, enabling the built-in pull-up will make it read high with nothing connected.

If you connect it to ground it should read low. If you connect it to Vcc it should read high. If you connect it to something else it should read whatever is connected.

P.S.
Normally an I/O pin is used as an input (read) or an output (write). If you write a high (or low) and then you read, it doesn't matter what you wrote because now it's reading the current state.

i suggest you use Serial.readStringUntil() instead. This lets you define a terminator, usually '/n'.
From your output, it never went inside the if (getCmdSerial == "test")
so your getData = digitalRead(35); is just from noise (assuming you connected 27 and 35)