https://www.greenmatters.com/p/how-to-wipe-a-computer-before-recycling
How to wipe a Mac:
Wiping a Mac is honestly a lot less complicated than you might believe. Though, you may need to save all keychains, passwords, account keys, and what have you to a flash drive before wiping. This will also keep track of random WiFi passwords and online retailers youve used for years. Restart your computer and as soon as startup begins, by holding down Shift + Option + Command + R until the Apple logo appears. This combination of keys will reinstall the operating system that came with your Mac.
The Utilities window should pop up in the middle of your screen. Open Disk Utility and erase your built-in hard disk. After that, elect MacOS Extended (Journaled) format and quit Disk Utility when the process ends. Youll need to navigate back to the Utilities menu afterward so that you can reinstall the original operating system. Do this by choosing Reinstall MacOS or OSX within the Utilities menu.
Note: Disk Utility should give you several disk wiping options, some taking a very long time, being more complete.
And also note, erasure may vary between magnetic disks and solid-state disks. (That's an advanced topic)
https://globalrecycle.net/how-do-i-destroy-a-hard-drive-before-recycling-my-computer/
How do I destroy a hard drive before recycling my computer?
Send your hard drive to Apples recycling center if you have a Mac
If you have a Mac computer, you can send the hard drive to Apples recycling center. Apples recycling center will erase your Mac hard drive (and recycle it) for free. Contact Apple to receive a free shipping label for the hardware.
Visit
http://www.apple.com/recycling/gift-card/ to contact Apple and request a shipping label.
Presumes you can pop the disk out.
Perhaps Apple will take the computer in trade and promise to erase the disk.
If this works, you'll get next to nothing in money, but save money as in "time is money" in erasing it yourself.
And as noted above, some outfits may do this as well. YMMV
https://www.cuit.columbia.edu/content/physical-security/dban
Secure Deletion with DBAN
Columbia University
download DBAN, "burn" it to a bootable CD or thumb drive.
Boot and erase the internal disk.
https://eshop.macsales.com/blog/41010-mac-os-101-how-to-boot-and-use-a-mac-in-target-disk-mode/
macOS 101: How to Boot and Use a Mac in Target Disk Mode
Hook up two computers as the article says.
Boot up your old computer in target mode (Boot with the T key held down)
The second computer should see the old computer's disk.
Use Disk Utility to erase it.
(I have not tried this)
HTH