I have been wondering about the best way to learn playing a new song on guitar. For example, a lot of people try to pick a small part, practice and perfect it and then repeat the procedure for the rest of the song.
Breaking pieces into small sections and practising them until you can play them well is probably the best way of learning a new piece.
However, you'll also need to work on linking these sections together so it doesn't sound too disjointed - you don't want to get too used to stopping at a certain point! To get around this, it's also a good idea to practise the entire piece all the way through slowly after you've got most of the sections right. Eventually you can speed up to get to the normal tempo.
Nobody can answer this for you - everyone has a different learning style, and you are going to have to find out what works best for you.
Some people would prefer to be able to bluff their way through a whole song first - improvising approximate versions of riffs or just strumming chords - before picking out sections to refine.
Other people prefer to perfect bar 1 before moving on to bar 2, and so on.
Personally, I've had teachers who make you repeat a riff for a whole lesson, then never actually go on to perform the whole song. That drives me mad. I'd much prefer to play a whole song badly, than learn one riff and do nothing else with it.
If you can get or make a recording of it and listen to it over and over again, that's what helps me. When I'm actually playing, I usually hear the whole song or piece in my head - all the parts, all the sections, etc, and I just follow along with what's in my head.
Clearly that method breaks down when I'm working with others on writing a song. In those cases I count measures or repeats out loud and might even call changes out for everyone's benefit (including mine). Having a white board around to write the changes down on to have them large and clearly readable helps during writing (or learning). I'll also use software to make little demo versions which help me learn the structure and also see areas of weakness or come up with ideas.
In terms of how I learn right off the bat, I usually start at the beginning and work my way to the end. Tricky parts will get extra attention. I don't like to get in the habit of only working a section at a time because transitions are key so I like to try to keep it unified with smooth changes from section to section.
If you know how to read and write music, you can consider something like what Adam Neely demonstrated on his YouTube channel.
He suggests writing out the music as you listen to it. Then, you can save the PDF and refer to it if you ever forget how the song goes. As long as you get quick at this, it could be pretty effective in the long run—but it takes some focus and a bit of a learning curve. He's also doing it for bass, which is a little simpler than for guitar since bass is typically monophonic.
It also requires a pretty good ear and preferably a quality recording. If your ear isn't well developed, the bonus for this method is that it will get a lot better with practice, and should make your life in music a lot more smooth!
What other answers have mentioned is also relevant—especially focusing on sections that you find difficult. Playing a section because you find it enjoyable, for example, is… well, enjoyable, but it's not the same thing as practicing.
Okay- This is for someone that has a good ear rather than reading or copying someone else playing. so for me, I find it easiest to find the root scale of the song first. I play piano instead of the guitar but it works the same. If you have found in what scale the song is in, you can start listening for the chord progressions. Now you have the basic skeleton of the song,you know which notes to play and which ones not to, and you know how the chords progress. Now you can start focusing on the finer details of the song. Is there picking evolved or some palm mutings. Also, do you want to learn the chord strumming or do you want to play the lead part... Either way, this always works for me. 𝄞 enjoy