The camera can be used with all Z mount lenses.
Confirm that the lens name includes “NIKKOR Z”.
F mount lenses can be mounted on Z mount cameras using an FTZ mount adapter.
Information on the F mount lenses that can be used with Z mount cameras and on any restrictions that may apply can be found in Compatible F Mount Lenses, available from the Nikon Download Center:
https://downloadcenter.nikonimglib.com/en/products/491/FTZ.html