Depth of field is the zone of acceptable front to back sharpness in a scene and you can maximise this by focusing hyperfocally. There is more depth of field behind a subject than in front of it and using this technique brings the zone of sharpness towards the camera position for a deeper depth of field.
Hyperfocal focusing is easier with a manual focus lens with a depth of field scale but if you want to exploit it with an AF camera, just aim the focusing zone at a point about one-third of the way into the scene. You might think the distant detail would be blurred but an aperture of f/8 or f/11 will make sure it isn’t. Check focus by taking a test shot. There are plenty of depthof-field apps available for your smart device and they will help you make the most of this technique.
focused at at f/11