There are several reasons why you see this error, but it comes down to dependencies. If you select the scheme that creates the iOS target, then you have no problem using the following command. Please note that I used iphoneos to automatically select the latest SDK.
xcodebuild -configuration Release -target "ios" -sdk iphoneos -scheme "ios" build
The problem you're working with is starting up due to the watchOS extension dependency. I created a sample project and added a watchOS application. On the Build Phases tab, you see in the Dependencies section that the iOS target has a dependency on the WatchOS target.

This is not a problem if you specify destination in your build command. But this creates a problem if you tell xcodebuild what needs to be created using a specific SDK. What for? Since the goal of WatchOS cannot be built using the iOS SDK. If you specify iphoneos as the SDK, the assembly will fail.
Specifying the addressee solves the problem, but be aware that you are using a specific simulator. If you use the same command on another computer and this simulator is not available, the assembly will fail.
Honestly, I donβt know if there is a middle way that allows you to choose the latest SDK and still use the correct SDK for each goal, regardless of dependencies. If you remove the iOS target dependency, the build command above should not be interrupted. You may also need to update the scheme you are using.
source share