Checking other posts iOS 12 should still be supported but the having upgraded an App in App Store it will not run on iOS 12 devices. Is there a trick to building for iOS12 support or has the goal post moved to iOS 15 which I find in specs for XCode
XCode 16 and iOS 12 support
iOS 12 is not supported by Xcode 16. The Xcode Support page has the details.
— Ed Ford, DTS Engineer
I’ve managed to run the Xcode 26.4 debugger with an app on an old iPhone 5s running 12.5.8 (though it failed for a different reason). The trick was to install a developer disk image for iOS 12.4. Since Xcode does not grab it from the old iPhone I found it on GitHub where someone collected these old images. You need to copy the dmg and signature to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport . Good luck.