It’s hard to say how good photographs happen. You have to be in the right place at just the right moment. You have to have a camera at the ready and an eye for composition. And that’s just the part that happens in the camera. There’s a whole other stage to great photography that many people don’t think about. It used to happen with lights and chemicals in a darkroom, but with today’s digital tools, post-production happens in darkroom software.
One of the best photo processors is Darktable, and one of its advanced features is masks. A mask in photograph processing gets used to limit adjustments you make to an image to just one area of the image. The linked article shows how this is used.