Fix:
Old firebase versions use GRPC with BoringSSL. And the latest version of Xcode 16 does not support the '-G' option for the target arm64-apple-ios.
So you need to update your firebase version to the latest version(v21.0.0 or above) to use the latest version of BoringSSL.
npm install @react-native-firebase/app@21.0.0
npm install @react-native-firebase/OTHER_FIREBASE_PACKAGE_YOU_ARE_USING@21.0.0
Install pods, you might need to update your pods to the latest version.
cd ios
pod install
This will fix the issue.