Can't compare a String from Serial Port with A constant String

Hello awesome community, I am making this program where I'm reading a string that is sent from the
serial monitor of the Arduino IDE that then should be compared with another constant one that is stored as a constant, this is how it looks:

String StringUno, StringDos,Recibido;

void setup() {

  Serial.begin(9600);
  pinMode(2,OUTPUT);
  StringUno = "Encender";
  StringDos = "Apagar";

while(!Serial){
}
  Serial.println("Comunicación Serial Exitosa");
  Serial.println("Espere...");
  delay(1000);
}


void loop() {

  if(Serial.available()>0){
    
    Recibido=Serial.readString();
    
    if(Recibido == StringUno){
    digitalWrite(2,HIGH);
    Serial.println("String fue Encender");
    Serial.print("\n");
    }
    
    if(Recibido == "Apagar"){
    digitalWrite(2,LOW);
    Serial.println("String fue Apagar");
    Serial.print("\n");
    } 
    }
}

I also made the code so I could read what I sent in another sketch and even it is the correct string it stills does not compare... why could it be? I tested it using a single char like 'a' and 'b' replacing the constant strings and the one readed from the serial monitor...

Any help is well recieved, thanks a lot.

Are you sending CRLF from the serial console ?

Why don’t you print exactly what you received (put that within brackets so you’ll see some invisible chars like carriage return or new line) and also including number of bytes it represents

Don’t use the String class anyway - bad habit. See Serial Input Basics And stdlib.h and
string.h

J-M-L:
Are you sending CRLF from the serial console ?

Why don’t you print exactly what you received (put that within brackets so you’ll see some invisible chars like carriage return or new line) and also including number of bytes it represents

Don’t use the String class anyway - bad habit. See Serial Input Basics And stdlib.h and
string.h

I did what you said about printing what I received and didn't work, Instead, I am going to read the libraries you commented, thanks for your advice I really apreciate it.

I did what you said about printing what I received and didn't work,

Please post the code you tried. What did it do ?