It's been referenced several times already in this thread but I think it's important to be aware of the differences between denying a goal scoring opportunity, and denying a goal.
In the former, you have to have an opponent who has a likelihood of either keeping or gaining control of the ball and who will, subsequent to said ball-keeping or gaining, then have a clear chance of scoring a goal.
In the latter, you have the ball heading directly towards the net, with no opponent having a chance to keep or gain control of the ball.
In the former, you have to judge whether an obvious goal-scoring opportunity would have ensued, whereas in the latter you have to judge whether a goal would have ensued.
In the former, you have to consider the four specified criteria (distance, direction, defenders and control) in order to arrive at a decision, in the latter you only have to apply one criterion (would the ball have gone into the net).
Very often, you see people referring to a handling offence that potentially stopped the ball going into the goal as a potential DOGSO offence, which is a conflating of the two different "denying" offences. It can only be a DOGSO offence if the handling stopped the ball going to an opponent.
If the question is whether the ball would have gone into the goal directly (and not via an opponent) the offence is denying a goal, rather than DOGSO, with all the differences that that entails.