This is a good question that you ask, dear soham-sen-1xzti.
Scolding, from the perspective of psychology, would be a form of "punishment". Now punishment is described as a consequence which we give to someone's behaviour, so as to discourage it.. or to prevent it from repeating again. This is usually the intention of punishment. We might do or say something unpleasant to another person, so that they reduce some behaviour of theirs which may not be healthy or appropriate.
Now what happens is that most often we are unclear as to why we do something "punishing" to someone else. Why we scream, scold or hit them, or do something else for that matter.
In fact, it is shown that instead of trying to "punish" to reduce a behavior that we do not like, it is more helpful to reward and encourage behaviors that we do like and want. What I mean to say is, instead of focusing on what is it about the other person that you Don't want, think about what it is that you Do want, and ask for that, reward that when they do it (by saying thanks, or appreciating that for example). Rewarding a behavior that we do want, so as to increase it, is found to be far more effective than punishing a behaviour that we do not want.
You could try this in any relationship of yours... it might take more patience and effort, but the results are more likely with rewards than punishments.
And like you mentioned, punishments could get very complicated. Punishing someone, in any way, can be effective ONLY if it specifically follows the behavior of theirs which we do not like (means it is not random), and if we tell them why we are punishing them this way. If this does not happen, our screaming or scolding or any form of punishing behavior often becomes random and vague and just becomes a form of hurt to the other person, without having the effect on their behavior that we might want.
Let me give you an example - a loved one of yours does not contact you and you feel ignored. One day you randomly scream at them out of the blue. Neither you know why, nor you are able to explain it. It somehow is a punishment coming from you, you want them to hear that you do not like something about their behavior, but neither of you understands that and it just becomes a conflict. Instead, when you scream or express your anger, if you are aware of what you are doing and are able to tell them why you are doing so, clearly communicating your expectations, then it is likely to have more of an impact. And like I said initially, more than all of this, rewarding - i.e. thanking your loved one when they do contact you, or appreciating them when they spend time with you, is likely to work better than the former way I just mentioned.
Hope my communication was clear and gives you some perspectives. Feel free to share any further thoughts. In fact, I am curious to know where this question comes from for you - is it from some personal experience(s) you are trying to figure out? You are also welcome to connect with an expert on the platform for sessions to have a more in depth exploration and understanding.
Take care and warm regards,