For guitarists, I strongly recommend that you learn songs by ear. You will gain a deep understanding of the song that you will probably remember for life. There are tabs all over the internet which you can use to check your work, but they should be a last resort. (Also note that there is usually more than one correct way to play the same passage, and many tabs are incorrect, so you need to be able to trust your ear and be critical about any tabs you might use.) It might seem difficult at first, so start with easy songs. And be prepared to spend multiple hours on a single song - training your ear has many other benefits, so don't think of this as "wasted time".
Also, taking notes by hand helps humans remember pretty much everything, not just songs. So do it. Even if you can't glance at your notes during a performance, even if you can't review the notes beforehand, even if you immediately throw them in the garbage, writing notes will help you remember.