Problem with password checker and messages on lcd

hello deal shortly with arduino and i have problem in the code below
Function all normal but I do not display the message on the screen lcd.print("CORRECT PASSWORD "); and lcd.print("WRONG PASSWORD "); instead of the message I get weird characters

#include <Password.h>

#include <Keypad.h>

Password password = Password( "7777" );

const byte ROWS = 4;
const byte COLS = 4;
// Define the Keymap
char keys[ROWS][COLS] = {
{'1','2','3', 'A'},
{'4','5','6', 'B'},
{'7','8','9', 'C'},
{'*','0','#' , 'D'}
};

byte rowPins[ROWS] = { 8, 7, 6,5 };
byte colPins[COLS] = { 12, 11, 10,9 };

// Create the Keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

#define ledPin 13

#include <LiquidCrystal.h>

LiquidCrystal lcd(19, 18, 3, 2, 1, 0);

void setup(){

lcd.begin(16, 2);
lcd.setCursor(0,0);

lcd.print("INSERT PASSWORD ");
digitalWrite(ledPin, LOW);
Serial.begin(9600);
keypad.addEventListener(keypadEvent);
keypad.setDebounceTime(250);

}

void loop(){
keypad.getKey();
}

void keypadEvent(KeypadEvent eKey){
switch (keypad.getState()){
case PRESSED:
Serial.print("Pressed: ");
Serial.println(eKey);
switch (eKey){
case '#': guessPassword(); break;
default:
password.append(eKey);
}
}}

void guessPassword(){
Serial.print("Guessing password... ");
if (password.evaluate()){
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("CORRECT PASSWORD ");
digitalWrite(ledPin,HIGH);
delay(500);
digitalWrite(ledPin,LOW);
delay(500);
digitalWrite(ledPin,HIGH);
delay(500);
digitalWrite(ledPin,LOW);
delay(500);
digitalWrite(ledPin,HIGH);
delay(500);
digitalWrite(ledPin,LOW);

Serial.println("CORRECT PASSWORD ");
password.reset();
}else{
digitalWrite(ledPin,HIGH);
delay(500);
digitalWrite(ledPin,LOW);
delay(500);
digitalWrite(ledPin,HIGH);
delay(500);
digitalWrite(ledPin,LOW);

Serial.println("WRONG PASSWORD ");
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("WRONG PASSWORD ");
password.reset();
}
}

Please, use the ## tags to post your code.
It looks better.

From looking in your code, the problem seems to be the fact that you use the LCD in the serial port pins.

LiquidCrystal lcd(19, 18, 3, 2, 1, 0);  //IN HERE YOU DEFINE YOUR LCD SIGNALS ON THE SERIAL PORT PINS. 

void setup(){
  ...
  Serial.begin(9600);  //IN HERE YOU START THE SERIAL PORT
  ...
}

Of course, I'm assuming you have a 2009 or UNO board. Since you failed to give any drawing or info, I may be right.
Try either not using the serial port, which I'm not so sure would still make this work. Or change the signals from pins 0 and 1 to somewhere else

yes but the lcd.print("INSERT PASSWORD "); in void setup its ok :frowning:

You could have told us that sooner.
Please edit your post to put the code into a code box.
Click on "modify", highlight the code, click on the # icon on the editor's toolbar, then click save.

Again... and I'll quote myself....

"Try either not using the serial port, which I'm not so sure would still make this work. Or change the signals from pins 0 and 1 to somewhere else"

I didn't even bother to go through the entire code... but... look.

void setup(){
  
  lcd.begin(16, 2);  //START LCD
  lcd.setCursor(0,0);  //SET CURSOR at 0

  lcd.print("INSERT PASSWORD ");  //WRITE TO LCD
  digitalWrite(ledPin, LOW);   //TOGGLE LED
  Serial.begin(9600);               //START SERIAL PORT... OR IN OTHER WORDS, TURN THE LCD INTERFACE TO $#!7
  keypad.addEventListener(keypadEvent); 
  keypad.setDebounceTime(250);
  
 
}

So the LCD works when you don't use the Serial Port. If you do need to use the Serial port and LCD, change the signals from pins 0 and 1 to somewhere else.

I tried it and works without the serial Thanks for the help

     if (password.evaluate()){
       lcd.begin(16, 2);
  lcd.setCursor(0,0);
  lcd.print("CORRECT PASSWORD ");

What happened? Did your LCD change size? Why are you calling lcd.begin() again?

apparently he doesn't know
lcd.clear();