Nikon Z8 is not (yet) on the list of supported cameras, even for the most recent system versions, see:
Digital camera RAW formats supported by iOS 17, iPadOS 17 and macOS Sonoma – Apple Support (UK)
It can take half a year or more, after a new camera is on the market, before the RAW support will be available. If the RAW format of the Z8 will be supported at all by a future system update, you would have to update your devices to this system version.
Below your question it is shown that you are using a windows computer, not a Mac. Are you asking about the Raw support on an iPhone or iPad? On the mobile devices the RAW support is meant to be used with third-party apps:
"iOS 17, iPadOS 17 and macOS Sonoma include enhanced support for processing digital camera RAW formats, providing better detail and improved noise reduction. These RAW formats offer greater image-editing flexibility on iOS and iPadOS using third-party apps that support RAW."
Until you know for sure, if the Z8 will be supported or not, it might be prudent to use only the lossless RAW format, as Apple did only add support for the lossless RAW for the Nikon Z9, as shown in the footnote 5.