If you listen carefully to prologue it's like this.
History became legend, legend became myth, and for two and a half thousand years, the Ring passed out of all knowledge. Until, when chance came, it ensnared a new bearer.
While above lines are spoken it's shown that a hand grabs the ring out of riverbed.
If you look closely it's not Gollum's hand. It's a healthy hobbit hand.
The next scene starts with following.
The Ring came to the creature Gollum, who took it deep into the tunnels of the Misty Mountains. And there, it consumed him.
Now it's a gnarled, twisted and filthy hand.
Spoiler Ahead ( contains beginning of third part of LOTR )
So first it was Déagol who took ring out of riverbed.
Then Déagol and Sméagol fought over it where Sméagol killed Déagol.
Followed by ring corrupting Sméagol mind to make him Gollum.
So the statement The ring came to the creature Gollum. is a way of saying it was then obtained by Gollum
Galadriel voiceover script