You, like many people, probably have old and no-longer-functioning electronics around the house. The laptop you meant to get repaired but eventually replaced. The old cell phone you intended to use as a backup if you needed one but now is so old you're not sure it'll even turn on. The printer you've mostly been using as a scanner because it insists there's a paper jam, but you haven't been able to find it, and now you have two printers. Some of this stuff you might have been holding onto because, well, you know that you shouldn't just throw it away. There's stuff in them that's bad to just throw away. You may not be certain what it is, exactly, you just know it's bad. Possibly some of this stuff is in exile in the garage or a junk drawer that you only ever go through when you can't find a pen that works. It's not really occupying your mind a lot. You've got the space for it, and it's mostly out of sight. Maybe you occasionally spot it and think, "I should get rid of it," but then it slips away when something more urgent comes along. That's pretty normal.
Okay, so what do you do with it?
First of all, anything that might have your personal data on it you should boot up (or try to) and clear off. You'll need to look for your specific operating system and device for instructions on how to clear your data.
Second, there are lots of places that will recycle your e-waste. Some larger electronics retailers will take some e-waste, and many cities hold e-waste recycling days when everyone can bring their old electronics to be taken care of. Some big box stores actually have an automated kiosk where you can sell back your old phone. Most manufacturers will take back their old products as well, though you will need to check on a case-by-case basis what they'll take back and how you'll need to get it to them.
There are also services that handle this kind of thing directly and will take most, if not all, of your items in one fell swoop. Many of them will even pick it up for you, making it more convenient for you to get rid of your old electronics. Some of these services will actually make sure to strip your personal data for you, which might be useful if you're struggling with getting the device functioning enough to do it yourself.
Learn more about electronic recycling by pursuing one of the options above.