As you can see, this is a basic groove...but it requires you to be aware of timing!(positioning of notes)
It helps a lot if you train yourself to listen out for timing of notes--let's call it the position of each note--in any song that you are learning.
Visualise this with me:
A wooden board with grooves (potholes?) dug into it at different positions.
Then imagine throwing some small wooden balls onto the board.
The balls naturally fall into the grooves rite?
That's how it is with a song.
Try to figure out where the grooves are, then place the balls (your bass notes) into them.
As you progress, you will learn how to be the one who carves out the grooves on a flat board instead of being handed a board with grooves in it already.
A good bassist will be able to do both--carving out grooves AND filling out grooves, depending on the song and the group that you are playing with.