Uno to ESP32 - HardwareSerial not working properly

I have an Arduino UNO connected to ESP32 through voltage divider with TX0 from Uno to RX2 to ESP32. My goal is to send data from my Uno to my ESP32 through HardwareSerial. Here's my code for the Uno:

long randNumber;
String myString;

void setup() {
  Serial.begin(9600);
}

void loop() {
  randNumber = random(40);
  myString = String(randNumber);
  Serial.println(myString);
  delay(2000);

}

Here I generate a random number, cast it to string and then send it serial through Serial.println(myString);
My ESP32 code:

#define RXD2 16
#define TXD2 -1

HardwareSerial Serial2(1); // Use UART channel 1

void setup() {
  Serial.begin(9600);
  Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2);
}

void loop() {
  if(Serial2.available() >= 1){
  Serial.println("ESP32");
  Serial.print(Serial2.read());
  }
  else {
    Serial.print("Not sending");
  }
  delay(2000);
}

After launching Uno and the ESP32 after a second or two, I got the following output:

UNO ESP32
7    ESP32
9     51ESP32
33   56ESP32
18   13ESP32
10   10ESP32
32    49ESP32
24    54ESP32
38    13ESP32
3     10ESP32

As you may notice, the numbers are not the same. Even if I unplug the Uno from electricity, the ESP32 still prints numbers and that should not be the case because it should print "Not sending". What am I doing wrong?

there is no need to cast into a string

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println(random(40));
  delay(2000);
}

this is weird...#define TXD2 -1

for reading you don't want any delay, just print whatever comes in, when it's available and print it as a char, not an int. try with

 include <HardwareSerial.h>
HardwareSerial unoSerial(1);
void setup() {
    Serial.begin(9600);
    unoSerial.begin(9600, SERIAL_8N1, 16, 17);
}
void loop() {
    while (unoSerial.available() > 0) {
      Serial.print((char) unoSerial.read());
    }
}

not the code changes change the output, but for upload you change the com port which changes the port for Serial Monitor too. so if you upload to Uno then you see only the 100 Uno is sending. if you upload to ESP32 you see the output of the ESP32.