Social media apps use ancient APIs which are not recommended since Android 5 for camera, and they won't update their shit. You need to use a dedicated camera app to take photo and use the taken photo.
You need an app that supports multiple cameras to access wide cameras. You can try this: https://play.google.com/store/apps/details?id=net.sourceforge.opencamera&hl=en&gl=US
Is that installed from the Galaxy Store, the Play Store, or some unofficial site which may be hosting a modified version (e.g. to remove device model checks and/or some non-portable API calls)?
https://play.google.com/store/apps/details?id=com.samsung.android.uds&hl=en_GB&gl=US is listed as not available for any of my devices (i.e. including my M51). Similarly, I'm aware of modified versions of Good Lock available from unofficial sites that may well work on the M51, but I don't care to try them, given the apparently fairly deep level of integration it uses, and therefore could misuse if modified maliciously.