Click Account in the Menu bar on the left side of your screen.How to sign out of iTunes (macOS Mojave and older) or the Music app (macOS Catalina or later) To avoid complications with the new owner attempting to download and install software licensed by you, make sure to sign out of everything your personal information is connected to. The software you have on your Mac is licensed to you, which means it doesn't get transferred to your computer's new owner (except the operating system). How to back up and restore your Mac with Time Machine.But, if you really don't think you'll need your old computer before getting your new one, make sure to back up your data so that nothing happens to it before you get what you need onto your new Mac. then you probably shouldn't be selling your old one yet. If you don't have your new Mac yet, well.
If you already have your new Mac on hand, you can transfer all of your data from your old Mac or use an older Time Machine backup. A completely fresh-from-scratch Mac is the best way to do this. If you leave behind anything that needs to be logged into with a password, that buyer will have to track you down and get your password to change ownership. It's a security and privacy thing for you, but it's also important for the buyer. If you're about to sell your old Mac, the one thing you don't want to do is to give away the data you've been storing on it all these years.