There actually is a way to delete your account from the Mac without wiping everything.
It goes like this:
• Sign out of Find My
• Sign out of iCloud and don't keep copies of your stuff on the Mac when asked.
• Go to Users & Groups and create a new User Account with admin privileges - name it something generic like 'Mac User'
• Sign out of your regular Mac user account and sign in to the new user account you just created.
Do not sign in to iCloud or Find My when prompted in the new account.
• Go to Users & Groups and delete your old user account and its Home folder when prompted.
That's it.
But this method does not touch third party applications or any other data that may be located outside your home folder, including system caches and files in the System/Library folders so it is not a clean start for the computer.
It does release the Mac from iCloud and Find My services.
A very important factor here if you're going to give ownership of the computer to someone else is to not sign into iCloud or Find My again in the new account.
The 2012 is well obsolete. It may still work, but the internet world has passed it by. Not even adding a couple more RAM can make it productive again on the internet. As a standalone machine it may have purpose, but it really is time to retire it.