I will split the song up into its parts.
Usually it's Intro, verse, pre chorus, chorus, and a bridge.
Sometimes not even that many parts!
Then listen, play, re-listen, play and so on until i have it.
I don't often worry about getting it exactly the same as the song unless the bassline is the main riff of the song.
Put your own slant on it. Aslong as you don't go too far from the original, you're golden