You asked

Is a 50mm or a 105mm better for the nikon d5 in a studio?

For studio work on the Nikon D5, the 105mm is usually the better pick. From a longer distance it gives flatter, more flattering portraits and tighter product shots, and it leaves room for lights and a backdrop. The 50mm suits small rooms and full-length or environmental shots, where you can't back up far enough for a 105mm. The guide's lens advice treats a 50mm as the everyday standard and an 85mm as the portrait lens, so the 105mm is a step further in the same direction.

Good options on the D5, which is full frame so these lenses frame as marked:

Studio light is controlled, so lens speed matters less than it does in dim rooms. The D5 has no body stabilisation, but on a tripod or with flash that is rarely a problem. For portrait ideas, see portraits. The budget guide explains why a good lens and lighting often matter more than the body.

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}.