Next time you upgrade your phone you should try to do a trade in, it bumps some money off of the price and solves the issue of having an old phone laying around. Pretty sure they recycle the parts after that, so win-win.
Most will take the trade in phones, refurbish them, and resale them on a used market platform like backmarket. Anything not worth reselling I think is recycled.
When the phone (or whatever) is still usable I always prefer to sell it. You usually get more money and the usable product gets used some more instead of getting destroyed.