Look into recycling it to somebody who could use a computer. Maybe it is someone down on their luck or struggling to survive and can't find a way forward or an elderly person or just a kid who could do with their own computer.
Slap Ubuntu on it and pay it forward. If you gift it to somebody looking to use it for more than Facebook then stick some free ebooks for Python or such on it.
It is easy to think "but everyone has access to a computer" and while that is mostly true having your own computer is very different from access to one.
My father is a teacher and has recycled three laptops (and a desktop a long time ago) to kids living on the poverty line. I know at least one was very grateful as I got a lovely thank you letter from them.