How do I set compatible devices to only ARKit compatible devices in Xcode?

The key is arkit for your info.plist file under Required device capabilities.

enter image description here

Apple documentation on plist keys (UIRequiredDeviceCapabilities).

Key: arkit

Description: Include this key if your app requires support for ARKit on the device (that is, an iOS device with an A9 or later processor).

Minimum version: iOS 11.0

One important caveat for existing apps is that Apple does not allow you to restrict devices for an app once it has been released.

Important: All device requirement changes must be made when you submit an update to your binary. You are permitted only to expand your device requirements. Submitting an update to your binary to restrict your device requirements is not permitted. You are unable to restrict device requirements because this action will keep customers who have previously downloaded your app from running new updates.

If you are adding AR functionality to an existing application, you can use the isSupported property of ARKit to determine if you should expose this functionality.