This thread is about your parenting struggles, not mine, but since you obviously need educating...
Children learn situationally. Which means that they need to hear the same rule and variations of the rule multiple times to understand it and apply it in context, even if it seems like a no-brainer.
"No shouting inside" = except a soft play is inside, and shouting is normal there. Or if we're playing a silly game. And it's not ok to shout outside if say, you're attending a funeral.
When their brains are building, they are literally building synapses which create stronger associations with repetitions, and link to other pieces of information that build up their behaviour.
Now, my son is lively but he likes rules. He will chirp up giving his playmates instructions, repeat things we've told him. But sometimes there's a balloon or he's tired or he's hungry and the rule and the correct behaviour is forgotten because right now, he wants the shiny thing, or the snack or has feelings he can't articulate yet.
But let's talk more about YOUR child's behaviour, since I can keep my son off his baby cousins.
What do you do apart from saying "don't do that" before coming to MN because you're all out of ideas?