The diopter is that tiny wheel next to the viewfinder… you have to make sure it’s set so that when you look through the viewfinder, the numbers on your light meter look sharp.
Also, when using autofocus, make sure it’s set to “one shot” focusing rather than “al servo.” One shot means you can select a focus point (this function depends on what camera you’re using) and then lock the focus by depressing the shutter halfway, and then while holding it, you can then recompose your shot. So you can lock it on the person’s eyes, and then move the camera to get the best composition. If you are using al servo, that is specifically for when you have moving subjects- like people moving toward or away from you, so that your camera can select the focus just as you press the shutter. If you accidentally leave it on al servo for a non-moving subject and then try to recompose, you’ll get the camera to focus on the background, throwing your subject out of focus. From viewing your last post, I think that’s what is happening. Check your camera manual to find out how to set your focus points and then how to change it from one shot to al servo. It’s easy to do quickly, once you get the hang of it.