Hello,
Welcome to Microsoft Q&A!
You could try to use CameraCaptureUI class to capture photos or videos by using the camera UI built into Windows. It allows you to launch the Windows built-in camera app and receive the photo or video file that was captured. This feature is easy to use, you can refer to this document to achieve it.
If you want to provide your own camera UI, or if your scenario requires more robust, low-level control of the capture operation, then you should use the MediaCapture class, and implement your own capture experience. For more details about it, you can refer to this document.