I ended up downloading the support files from https://github.com/filsv/iOSDeviceSupport/blob/master/14.7.1.zip and installing them to XCode manually.
I am not sure why the support files went missing. My guess is that XCode auto-updated from 16.0 to 16.1 without my knowledge, and 16.1 didn't contain this iOS version.
This issue is now resolved and I can build again.