The code is okay and the pins are correct.
How do you know for sure? It’s not working, after all…
Share ALL the information about this project, including the model of camera, schematic for your wiring, and your code.
For everyone else: OP’s thread titled “soldering” has photos of the wires soldered to the ESP32 board. But without context who knows whether that’s correct as it is or not.