Another approach is to first learn about the harmonic structure of a song: the chords that act as its backbone and the tones of those chords that make up the notes played during the various parts of a song. This might sound more complicated than it actually is at first glance, but it really isn’t hard once you learn some basics.
Think about it this way: As a small child, you’re taught the alphabet. That’s great, but you still can’t read.
But then, you’re taught the spelling of simple words that kids commonly know: dog, cat, boy, girl, Jack, Jill, etc. Now you have some vocabulary to work with.
Then comes learning simple sentence structure: Jack and Jill went up the hill, etc.
The point is that music is most definitely a language. It has vocabulary (chords, scales, arpeggios, etc.), structure and “grammar.” In other words, music (a song) is constructed and spoken in particular ways so that other musicians can understand it and listeners can appreciate hearing something they are familiar hearing.
All of this is not to say that just learning the specific notes of a specific song is bad or wrong, because I know I’ve done that. But learning how and why a song (and a ton more) is built that way makes learning essentially any song you want to learn faster and easier.
@JoshFossgreen brilliantly introduces this general concept in the Beginner to Badass course. He keeps things fun and light, but make no mistake: he’s teaching about how music is composed and why, and he uses multiple examples (songs) to illustrate the various ways a bass can be used to communicate it. He’s a tricky one, that guy. 
But back to previous advice: Learn songs. However you can. As many as you can. If you never care about or think about how they’re built and why, you’ll at least know how to play those specific songs.
But if you ever become curious to learn more songs, faster and better, or maybe even how to write your own songs some day, there are many great bass courses available that can speed you on your quest.