Nikon 50mm f/1.8 or 24-70 f/2.8?
Which one is sharper for doing studio portraits?
You can choose the 50mm for doing studio portraits as well as street photography! You won't regret using a prime lens for indoor photography or in a low light condition.
24-70 is sharp and gives you more flexibility if you need to move around
You don't say what camera you are using these on. If it a crop frame camera your 50mm is 75mm equivalent on a Nikon, 80mm equivalent on a Canon- these are excellent focal lengths fr portraiture where 85mm is considered the preferred focal length by many for portraits and the 50mm om a cropped frame is close to this. On Full frame camera where it is a 50mm lens, it is not a very good focal length for portraits, it is not considered as flattering as a longer focal length.
The 24-70mm lens is a great and very versatile lens. On a cropped frame sensor it is 36-105 mm (Nikon) or 38-115mm (Canon) giving you from a wide angle to a moderate zoom level. In the middle of the range at 85mm you get the flattering focal length for portraits, and you can use the extended focal length for portraiture as well (generally the longer the focal length the more flattering and the better bokeh (background blur) you can get at a set aperture point) though 100mm+ for portraits requires a lot of space!
On a cropped frame camera I would suggest the 50mm f1.8 as it is a good focal length on the cropped frame for portraits and primes tend to be sharper than zoom lenses. However, on a fixed frame camera I would recommend the 24-70mm as the 50mm would be too law a focal length for really nice portraits (though obviously you can still take good portraits with it)