Functional way to connect ESP32 to 16x2 LCD without I2C module, using 4-bit communication.
Here is where the code stretch you should pay attention to as well as make the correct connections in board.
const int rs = 23, rw = 4, en = 22, d4 = 5, d5 = 18, d6 = 19, d7 = 21;
LiquidCrystal lcd(rs, rw, en, d4, d5, d6, d7);