I don't think you require pairing an iPhone with MacBook for "download data (such as photos) "
If MDM profile is preventing from transfer of data between the devices. then...

- Is this your corporate iPhone? Then please contact the system administrator of your corporate
- If it is your personal device, in that case, do you have any profile installed by your corporate/organisation/enterprise/School Management?
- Erase the profile added by you If you have installed a profile on your own --> Install or remove configuration profiles on iPhone - Apple ...
- Or please contact the system administrator of the organisation who provided the profile to you
- If you want to turn on SSL trust for that certificate, go to Settings > General > About > Certificate Trust Settings. Under "Enable full trust for root certificates," turn on trust for the certificate. Apple recommends deploying certificates via Apple Configurator or Mobile Device Management (MDM). --> Trust manually installed certificate profiles in iOS and iPadOS ...

MDM is a technology that allows organizations to remotely manage and configure mobile devices, such as iPhones, iPads, and other mobile platforms. It enables IT administrators to enforce security policies, distribute applications, and manage device settings.
To resolve this issue, you can try the following steps:
- Remove the existing MDM profile: Go to the "Settings" app on your iPhone, select "General," then "Profiles." Find the existing MDM profile and remove it. This will remove the old payload and associated settings.
- Reinstall the MDM profile: Contact your IT administrator or MDM provider to obtain the latest MDM profile. Install the new profile on the device, following the provided instructions. Ensure that the new profile contains the correct and updated "CheckInURL" value.
By removing the old profile and installing the new one, you should be able to resolve the mismatched keys issue and establish a proper connection between the device and the MDM server. However, if the problem persists, it would be best to consult with your IT administrator or MDM provider for further assistance and troubleshooting.