If you are using a mobile device, usually tapping the screen where the image of the document is helps. If it does not or if you are using a computer, here are a few things that should help the camera focus better:
Make sure that the light is coming from the back of the camera
Use contrast background. Darker background for light documents and vice-versa
Take a picture from further away. This way it is easier to get your camera to focus, but be careful to not zoom out too much as the picture might come out blurry
Switch cameras. Although normally your device's back camera makes better quality pictures than the front camera, it might not work properly and it is possible that you get a better picture with the front camera