Linking Arduino Mega with ESP32 Cam

The youtube video I refer to is attach below (I follow its pin connection but I'm using Arduino Mega instead of UNO): https://www.youtube.com/watch?v=q-KIpFIbRMk&t=266s

Can you post the program code you are using and provide a schematic of the connections.

And provide an expalnation of why you want to 'link' the ESP32CAM and Mega.