Even if the display of your phone or tablet with iOS/iPadOS or Android is damaged and operation is impossible, there are various ways to recover your data. However, there is no guarantee of success.
In a web browser on your computer, go to www.aka.ms/phonelinkQRC and scan the QR code. Tap View Permissions and enable the permissions the app requests (Phone, SMS ...