Can a piezo disc be connected directly to a op amp?
You may have destroyed the ESP32 when you used two batteries because the op-amp will then be capable of delivering significantly more that 3.3 volts into your IO pin. Always use a series current limiting resistor when doing things like this - wire it in series with the IO line, something like 10 kohms.
Regarding the amplifier and the piezo disc, you need to have a high impedance input to get decent voltage levels from the piezo. Your circuit appears to have an input impedance of 1.21 kohms and this is really quite low - you should be considering a resistor in the mega ohms region for this. So R1 and R2 at 1 Mohms stands a better chance to work but don't forget the series current limiter for the IO pin.
You can use a single supply of at least 5 volts for the op-amp. 3.3 volts will be too small to detect any digital change on the output of the LM324 most likely. Running from a single supply will mean that you only amplify half the signal produced by the piezo disc but, as you are using it to detect vibration it will probably work. If you are using it to measure vibration then you will need a different arrangement that's a bit more complex.