The following article shows ways to get around your issue.
https://www.swiftdevjournal.com/dealing-with-failed-to-prepare-device-for-development-error-message-in-xcode/
If the workarounds in that article don't work, you will need to find a device running an older version of iOS to run your project on your Mac.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: