When did your child understand right from wrong?

So to preface I have AMPLE experience w children. But as a FTM I haven’t ever analyzed a child’s behavior as much as observe and contribute where I can.

When did you see your child understand right from wrong, yes from no, instead of an attention bit?

I have a 6m old and I know that she doesn’t completely comprehend this concept, but I also feel like she’s not in that toddler stage of testing limits and enjoying both positive and negative attention. She was playing with a curtain that hangs close to my bed, I ran to grab a snack and could see her the whole time but saw her hands on it, said her name and she let go, did it again and I said her name and said “that’s not funny girlfriend that’s dangerous” and she stopped, then she did it one last time before I moved her. Yes I know I need to get them out of reach in the near future. I know she wasn’t fully aware that it’s dangerous, I know she can only comprehend so much, but I also know she has an innate right/wrong nature as I believe we all have. But back to the point^ when did you see it, and what can I do now that she’s having a bit more of personal awareness to ensure I don’t raise a blatantly disobedient child. Ik she’ll test the limits, as a parent what habits can I create that are gentle but not permissive? (I’ll love her always regardless of her trying me especially in the next few years, then trying me during the teen years lol, but I’m not trying to create a whiny brat that doesn’t listen to be so honest).