Retirement tax questions

Some people say it’s counted as earned income when a parent pays their child in case to do chores like walking the dogs, and to keep a log of the activities and payment.  But if a neighbor pays my child cash for walking the dog, that is fine?  It shouldn’t matter if cash comes from neighbor or parent.  Teaching a child payment for work is a good thing either way.