I have an old computer that is no longer working and I want to donate it or perhaps throw it in the trash. However, I don't want people to potentially get my banking account data, usernames/passwords I have entered on the computer, software installed, legal or medical documents, internet browser data, etc. I am going to keep the hard drive, should I do something more to the computer before getting rid of it?
Donate your Laptop without a hard driver or replace it by a new one, there a many forensics tools able to restore the deleted data (password, files, visited URLS...)
A common technique used in computer forensics is the recovery of deleted files. Modern forensic software have their own tools for recovering or carving out deleted data. Most operating systems and file systems do not always erase physical file data, allowing investigators to reconstruct it from the physical disk sectors. File carving involves searching for known file headers within the disk image and reconstructing deleted materials.
You are looking to protect the data from accidental leakage or from someone with limited IT knowledge, such as an administrator who knows how to look at drive space marked as "free" by the operating system but still containing data.
For these purposes, a good low-level wipe should do. A lot of information on the Internet is outdated and claims data can be recovered by this and that method, but the reality is that the increase in data density on drives has rendered most of those methods obsolete.
The easiest way is probably using a bootable CD with Linux and either a dedicated tool or the commandline dd command. Here is a link doing this with Ubuntu and here is a much simpler approach using DC3DD. There are also two questions on AskUbuntu about this.
If you are using dd, I would recommend overwriting it three times. Once with zeroes, once with ones and once with random bytes. Make sure you overwrite the whole disk. While there may be theoretical ways to recover at least partial data after that, they are outside of the capabilities of the threat actors in your described scenario. As long as you don't try to hide data from the Mafia or a spy agency, you should be good.
If you keep the harddrive, then securely erasing it isn't the problem. Make sure there's no built-in SSD that the system might be using for caching (some early SDD-accelerated systems had external caches).
RAM should be impossible to recover to any threat actor in your scenario. You can boot the system from a live CD and run a memory test if you want, which will write and read all the RAM, but that's already overkill.
This is one more reason why you should always have the drive encryption active on all your systems. Then you don't have to worry about data loss.
There are easy and effective free wiping tools such as DBAN https://sourceforge.net/projects/dban/. There's a walk-thru guide at https://www.lifewire.com/how-to-erase-a-hard-drive-using-dban-2619148.
Dban and other tools are generally very simple and effective, however there are specialized edge cases that are possible and verification is left to you.
If you don't have the knowledge to perform your own verification, decide what the very low probability of risk is relative to the hard drive cost you are trying to save. If you still have concerns, just physically destroy the drives.
Update based upon new statement of removing the drives.
The above answer still applies to your drives and any potential reuse.
Nothing else in a typical machine stores persistent personal data, so you should be good to go.