Hello Caroline.
Welcome to the Microsoft Community.
We're sorry to hear that you're experiencing the Surface slim 2 pen not charging.
With that in mind, I would suggest you refer to the following page for a simple troubleshooting to see if the problem is a hardware issue with the pen itself:.
https://support.microsoft.com/en-us/surface/fix-problems-with-charging-surface-slim-pen-09b3d27f-174d-2efe-2c1c-b9372249267a
If completing the troubleshooting and firmware update doesn't work, you may refer to the repair at the end of the page to create a repair order:
https://account.microsoft.com/devices/select-device-for-repair
* Usually for parts under warranty, after-sales service will replace the parts with new ones. Everything is subject to the repair information after you submit the repair order.
Please feel free to leave us a message if there is anything you are not sure about.
Thank you for your patience and understanding!
Best regards.
Darren-Ng | Microsoft Community Support Specialist