DOGSO inside a penalty area can result in a red card or a yellow card. DOGSO by handball is always a red card. DOGSO that does not involve an attempt to play the ball (e.g. holding, pushing, pulling) is penalized with a red card, as well. But DOSGO as a result of an attempt to play the ball is penalized with a yellow card.
Referees are generally advised to give the defender a benefit of the doubt. We will never know the true intent of a player. But if you, as the referee, can make a case that the defender attempted to play the ball, then you are advised to give a yellow card. Of course, when a foul occurs when the defender has no chance to pay the ball (e.g. the ball is close to the attacker but not to the defender) or when it is one of the examples above (push, pull, hold), then an argument for a yellow card cannot be supported.
But what this means is that as referees, we can not just blow our whistle when we see a foul. We must examine the nature of an offence. We must have a macro view of the incident, and not focus just on the point of contact.
The video example below shows the importance of identifying the nature of an offence, because the consequence is very different (i.e. a red card or a yellow card).