You asked

Is a 56mm f 1 2 or f 1 4 a better portrait lens for an aps c nikon camera?

For a portrait lens on an APS-C Nikon, the guide would pick the 56mm f/1.4. On APS-C, a 56mm at f/1.2 to f/1.4 does the job of an 85mm on full frame, so it gives you the classic portrait look with comfortable working distance. Of the three 56mm primes in the catalogue, all listed for Nikon Z, the f/1.4 is the sensible middle.

The Viltrox AF 56mm f/1.4 gives you the usual portrait speed and autofocus. The Sirui Sniper 56mm f/1.2 gives you a little more light and softer backgrounds. That extra stop is useful in dim rooms, but at f/1.2 the sharp plane is very thin, so a slight movement can leave an eye soft. Unless you specifically want that look and can focus carefully, the f/1.2 is the harder lens to get right. The TTArtisan AF 56mm f/1.8 is the budget choice. It gives up one stop of light and some background blur, but it is still a strong portrait lens for the money.

None of the three has stabilisation, so the camera body has to keep shots steady in low light. Keep your shutter speed high enough for people who are moving.

For the wider framing that shows where someone is, the guide's portraits page suggests a 35mm instead. Pair any of these with your Nikon Z body, and check each lens page for current prices, since this answer doesn't quote them.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.