Hola @Manuel_Barrera,
a similar project, i.e. an app communicating via BLE to a NANO33 has been treated in another topic a few days ago.
You can find here below the link. The project aim was at switching on and off some LED's driven by the NANO upon commands received via BLE by the app.
In the thread you'll find the app written by @ChrisWard, and a file .ino written by me specifically for the ESP32 (BLE_Uart.ino) working in pair with Chris' app. I've tested them end they were working fine.
Hoping it could help you.
https://community.appinventor.mit.edu/t/controlling-leds-from-my-phone-via-bluetoothle/69575/153