You don't mostly.
By practicing, you'll get shots that are consistently correct in regard to focus and exposure.
And shots that are closer to what you initially envisioned.
So you have to develop an inner vision. Some people can, some cannot.
That's the gist of it. You can ape the greats or learn theory, but that's extra.