
In simple terms Depth of Field is how much you want in focus in a scene.
In most cases you will use a high FStop (a smaller aperture) number for landscape photos getting both foreground and background in focus.
When taking close up shots you may want to highlight your subject and limit the Depth of Field which blurs the background. You will use a lower FStop Number (a larger aperture).
However there are always exceptions based on what you want the viewer to see. There may be good reasons to use more or less Depth of Field in any situation.
I was taught the the higher the Fstop number always gave a more pleasing landscape shot. But not truly so. Most cameras give the most pleasing shot at around f14. The actual number varies a bit with each camera.
Sometimes we must use a different fstop than we might desire. The ambient light has a practical bearing on what fStop we use. Less light the more we will need to open our aperture. Remember the fStop number is inverse to opening of the lens or aperture. So for lower light we will use smaller fStop numbers which open our shutter allowing more light into the camera. With brighter light we will us higher fStop Number narrowing our shutter.
In most cases we most often use higher fStop numbers for landscapes and lower for close up subjects like flowers or portraits.
For Illustration you will see that I used a low FStop (about the f4 range) for the Pomegranate to blur the background and highlight the plant. In the case of the landscape picture I used about a f14 to give more focus throughout the image.