I encountered the same problem. In order to resolve this issue, you need to strip the bitcode present in your OneSignal package. You can use the following command inside your bash terminal:
xcrun bitcode_strip -r OneSignal.framework/OneSignal -o OneSignal.framework/OneSignal
If you want to read the solution in detail, then you can read my full article posted on https://medium.com/@abdulahad2024/fixing-bitcode-issues-in-xcode-16-how-to-resolve-invalid-executable-errors-when-uploading-ios-da07a5a39c7c.