Learning and studying your favorite songs has such positives affects on your overall musicianship. Writing songs and studying song craft is only a part of the growing process as a musician.
Really digging into how your favorite artists write, play, create, record, and perform their music can have an amazing impact on how you end up doing those same things with your music. It's also a nice and enjoyable shortcut to writing better songs.
Here's how I typically break down the process:
Step 1: choose an artist
Step 2: choose a song
Step 3: choose an element of that song (lyrics, vocal melody, rhythmic aspects, chords, drum patterns, etc)
Step 4: learn the chosen element for the entire song
Step 5: practice it until it becomes "easy" for you
Step 6: reflect on how it was created
Step 7: figure out how to implement those characteristics into your songwriting
I did this exact thing with a song that I love called Dark Horse by CONVERGE. Learning how their guitarist (Kurt Ballou) thinks about riffs, rhythms, licks, and song structure was very insightful to me. From doing this one thing alone, I was able to translate some of his genius into how I approach my personal writing, and it has been priceless.
Here's a video I made of myself after learning the song.
Learning to extract qualities from some of your favorite songs, making them your own, then using them in your writing...is a powerful tool. Use it!