If I am not wrong, human beings incur negative karma even when they do something wrong as kids or ignorant in their youth when they are 20-21.They don’t know that they are doing something wrong, yet what they do is considerd to be sins. Then when animals kill, they are not considered to be sinners. Why? After all in both cases, the negative deed is being done unknowingly.
Karma is the sum total of every action, activity, or thought a person has had or done, in this and every other lifetime.
Most people think of all karma as “bad,” but that is incorrect. It is simply an action or a thought. Karma may be bad (harmful), neutral, or good (helpful).
One requirement for creating karma is an ego, which Yogananda defines as the soul identified with the body. Animals do not have an ego — they are motivated by the insticts such as the instinct to survive, procreate, etc.
Whereas human beings do have an ego. So animals’ actions do not create karma, whereas human beings do, no matter their age.
You ask about bad karma that children might create because they are ignorant of the laws of karma. Ignorance is no excuse for breaking a law. The law is there to teach us not to do wrong things in the future. Life is a school and that is how we learn.
There is much more that could be said, so I strongly suggest to you that you read: Karma and Reincarnation: The Wisdom of Paramhansa Yogananda, Vol 2. It is a wonderful way to learn more on this very interesting subject.