As highlighted in the comment, all other things being equal, the sharpness of a lens depends only on the aperture. Of course, you need to use the suggestion of Why are my photos not crisp? to use the most of what you have.
As mentioned in this question (Is there a difference in sharpness between aperture stops?), lenses are soft (low sharpness) at their maximum aperture and sharpness increases as you stop down your lens (=as you are using a smaller aperture, for example from f/2.8 to f/8).
However, due to diffraction limit (What is a "diffraction limit"?), you can stop a lens indefinitely and after a point, sharpness decreases again (example : Why isn't this portrait taken at f/29 sharp?).
If you want to have the sharpest image your lens can deliver with a single shot, you might want to look at charts made by people reviewing lens. For example, for your lens, you will find result such as this one (from www.photozone.de) :
This chart gives the MTF of your lens (see How do I interpret an MTF Chart?): the higher score, the better the resolution. So with your lens, the best settings should be around f/5.6 for a maximum sharpness.
Of course, with a given aperture and if your want to keep the same distance to your subject, the depth of field will be fixed too (look at What is aperture, and how does it affect my photographs? and What exactly determines depth of field?).
With an aperture of f/5.6, a focal length of 50mm and a distance to your subject of 2 meters, the DoF will be about (results from http://dofsimulator.net/en/), the DoF will be about 35cm (from 16cm in front of your focus point to 19cm after it). It changes to 50cm at f/8.
If the DoF is too shallow for your taste, you can use another technique.
If you really want the best sharpness on all your object (or your scene), you can combine multiple images taken with the best aperture, each taken with a different point of focus. This is called "DoF stacking" and you can find more info here:
For a portrait, however (=moving person in the scene), I doubt DoF stacking is a viable solution (probably a lot of ghost effects).