Two people lean together and your dog growls. You cannot tell from that sound alone whether they are worried about one person approaching you, startled by the movement, or uncomfortable with closeness. You can tell that the setup is not working. Pause, give the dog room, and avoid recreating the moment to find out whether they will do it again.
Keep your dog separated from close greetings or hugs while you work out the pattern. Use a comfortable room or secure gate rather than pushing them away by the collar. Do not punish the growl, it is useful warning before a bite. If the dog has snapped, a child is involved, or the behavior appears suddenly, ask your veterinarian and a qualified, reward-based behavior professional for a safe plan.
Teach an easier place to be
At calm times, reward your dog for resting on a mat away from people. Practice brief, low-key movement between adults at a distance where the dog remains relaxed, then return to ordinary activity. If your dog stiffens, approaches rapidly, or stops eating, make the next session simpler and farther away. Do not ask a person to be the target of a growling dog for practice.
Sometimes the best routine is to put your dog in their comfortable place before guests arrive or family members greet. You can be affectionate without asking your dog to supervise. A peaceful separation is a good outcome, even if the dog never becomes a fan of animated greetings. For more on making room for family closeness while the dog has a protected space, see the dog-and-family space guide. Keep greetings separate from the dog for now.
Sources: Dogs Trust: Resource guarding in dogs. Dogs Trust: Dog aggression towards visitors.