see post ESP32 to ESP-CAM for Serial1 code for an ESP32
you should be able to connect it to a UNO using SoftwareSerial on pins 2 and 3
make sure you reduce the baudrate as SoftwareSerial will not work over 38400baud on a UNO
remember the UNO uses 5V logic and the ESP32 3.3V logic - you require a potential divider on the UNO Tx to ESP32 Rx or you can damage the ESP
any particular reason to use a UNO and ESP32 - could you not just use the ESP32?