Hi, may I know is it okay if I connect directly esp32 to 9v battery? or should I use this lithium battery with shielded casing.
Depends on the ESP32 board you have and the voltage regulator used in it (if any).