How many years should I learn guitar to play songs faster?

No simple answer. No simple answer. You can practice for years without speeding. However, if you have a good instructor, he or she can help you analyze your game and help you to improve your overall game much more quickly than most people can. The key to playing quickly is playing slowly. And I mean as slowly as humanly as possible, by really slow. With metronome. With metronome. Then get a little bit up the tempo. And frustrate yourself. But don’t be discouraged by frustration. He’s a strong driver. Go back to the slower tempo when you reach your limit. Be tough with yourself and merciless. In the long term, it will pay off. But not every now and then! The main thing about practicing is to have fun.