1, the charging port contact is poor, re-plug the charger try.
2, the charging port has dust, try to clean the dust.
3, the charger problem, use the original charger to charge.
4. Problem with apple pencil, reset apple pencil and try to re-pair.
5, after-sales maintenance, take the apple pencil to the after-sales maintenance center for testing and maintenance.