As a new bassist what you are doing now is almost impossible unless you have very good ears. I would suggest you start over and go down another road.
Mambo mentioned recognizing the chord as a way to start this. If you can identify the chord by name, the name of the chord is the root note of that chord.
Most songs follow specific chord progressions. Nine times out of ten when I'm faced with wanting to know the chord progression used in a song I'll ask Google for help. Ole Google normally comes to my rescue. Google these words; Chords, "name of the song".
For example; chords, "somewhere over the rainbow" got me this: [Invalid or Expired Link Removed]
OK the first verse starts with a G chord. OK we know that the notes of a G chord are G-B-D with G being the root. To make a chord we "stack 3rds" or use ever other note in G's scale and come up with the R-3-5 scale degrees of the G major scale. Problem here is we do not know if that was what the original bass line had in it. ---- Read that again.
Also understand our bass line has harmonizing notes in it; not melody notes. Yes later, how much later, a long time later you can put melody notes into your bass line, but, for now stick with harmonizing notes. What are harmonizing notes? Notes of the active chord. If the bass clef and the treble clef (where the melody comes from) share like notes harmony happens. So it's the sharing of like notes that make all this happen. Read that again...
The original bass line probably started with the G note or the R root but what other notes of the chord were included is up for grabs.
If I was to wing a bass line for this song I could just pedaling G notes to the beat until another chord change comes up. Or I could use the root G with the 5th note (D), or I could use any combination of those three notes. This is why I'm saying you are starting your journey
at the hard end of the stick.
Let Google find you some chord charts and try pounding out root notes to the beat of the kick drum - for starters. When that comes easy then start using the R-5, and when that flows add an 8, which is the root in the next octave. I think you will find that a bass line (in 4/4 time) of R-5-8-5 will let you play a bunch of bass. It may not be note for note what the original bass line had in it, but, the rest of the band will be able to follow your groove of R-5-8-5. And if they can follow your groove they will ask you back.
Post # 14 in this string will go into detail.
How to get started?
Good luck.