How can I use serial communication between my esp32 cam once it has detected an object to ask a UNO r3 to do something?

Logic level shifters are required when connecting I/O pins on 3.3V devices (e.g. ESP32) to I/O pins on 5V devices (e.g. Uno). These are bidirectional. Failure to do so can cause major malfunctions and possibly damage to the I/O pins.

For reliable communications between MCUs, have a look at the Serial Input Basics tutorial.