On recent phones the lock screen can cut the main subject out of a picture and lay it over the clock, so a peak or a cat's ear seems to stand in front of the digits. The phone is not reading depth from the file; it runs a segmentation pass that guesses where the subject ends and the background begins. If that guess comes back uncertain, the option simply goes grey, without telling you why.
Three things decide whether it works. The subject needs a clean edge against a plain area, which is why a summit against open sky succeeds far more often than a person against a busy street. It should reach into the clock band, roughly the upper fifth of a tall frame, but only partway: when it covers more than about half of the digits, the system hides the effect so the time stays readable. And on several versions, placing widgets under the clock switches the layering off, a trade made to keep the stack from getting crowded.
So the pictures that suit it are mostly sky with something rising from below, a tower, a ridge, a single branch, with room above it. Moving the crop down a little, or zooming out with two fingers, often brings the option back. What you get is a small piece of layering on a flat sheet of glass, and it lasts only until the next notification slides over everything.