Last week I bought my second second-hand Lenovo X240. I bought the first one several years ago and it showed to be an amazing experience to develop code using an outdated PC.
Not all the people has a trillion-core with hundreds of RAM PC to run my code. It gives you a better idea about code optimization needs.
It is a sustainable, light, solid, cheap, interesting,..., option to consider.
This second one is for my wife. She had another Lenovo but this one is enough for most of their needs.