Many beginning landscape photographers read online tutorials that suggest using f/22 for maximum depth of field and blindly follow that advice. And while a smaller aperture does influence depth of field, f/22 isn’t the best answer. There are other elements at play that allow you to use a wider f-stop and get the same - if not better - results.
There are a number of reasons for this, each of which has to do with the sharpness of your final image.
https://www.photographytalk.com/phot...e-myth-of-f-22