If you want to record your view including your passthrough camera on the Quest 2, Quest Pro or Quest 3 you will need to work around some features that Meta put in place to protect the user privacy.
Meta and 3rd party developers don't have access to your passthrough cameras which can only be seen from inside your device (due to privacy reasons). When you try to make a recording or share your passthrough view the passthrough camera will typically render black.
To enable developers to make Mixed reality recordings and demos of the gameplay you can bypass this black rendering using the following steps:
1) Enable developer mode on the headset
2) The next time you record an in-device photos, videos or stream your view the passthrough camera will also be included
After the video recording is completed can find the file on your Quest device under
\Quest 2\Internal shared storage\Oculus\VideoShots
There are some advanced video recording settings that you can play with using the latest experimental camera features or by using custom Android Development Commands to manually tweak the recording settings using apps like SideQuest