If you want to cross the border with a child, be sure to take the child’s passport or another document confirming their identity with you.
If the child has no such document, try to at least have their birth certificate with you. A child crossing the border with a person who is not their parent needs to have a document expressing their parent’s or parents’ consent to them leaving Ukraine under the care of that person. It would be best if that document was certified by a notary but if this is impossible, it may still help to have at least a written authorisation from the child parent(s) with you. An example of such a document can be found here. If there is a family member waiting in Poland, they should contact the Polish Border Guards.
If one parent crosses the border and is able to do so, it is advisable to take the other parent’s written consent with him/her. If it is not possible to sign such a document, the situation should be verbally explained at the border control.