The Lord of the Rings: The Two Towers

Frodo Baggins and Samwise Gamgee continue their journey to Mordor to destroy the One Ring by throwing it into Mount Doom. They are attacked in the night by Gollum, former owner of the Ring, but they capture him. Sympathising with Gollum for their shared burden, Frodo asks Gollum to lead them safely to Mordor, despite Samâs objections. Meanwhile, Aragorn, Legolas, and Gimli pursue the Uruk-hai who kidnapped their friends Merry and Pippin. The Uruk-hai are slaughtered by the Rohirrim army of Rohan, but the two Hobbits escape into Fangorn Forest where they meet the Ent Treebeard. Aragornâs group later meet the Rohirrim who have been banished by their king ThÃ©oden, who is manipulated by Sarumanâs servant Grima Wormtongue. Tracking the Hobbits in Fangorn, Aragornâs group encounter a resurrected Gandalf who perished in Moria, but was revived to help save Middle Earth.
Gollum leads Frodo and Sam through the Dead Marshes whilst evading the NazgÃ»l. They reach the Black Gate to Mordor but Gollum stops them, saying it's too risky and that there is another entrance, finding himself becoming loyal to Frodo for his kindness. The trio later are captured by the Rangers of Ithilien, led by Faramir, brother of the late Boromir. When Faramir discovers Frodo has the Ring, he intends on taking him to Gondor, capturing Gollum when Frodo exposes him. Aragorn, Gandalf, Legolas, and Gimli travel to Rohanâs capital Edoras where Gandalf releases ThÃ©oden from Sarumanâs power and Wormtongue is banished. Learning Saruman plans on wiping out Rohan with an army of Uruk-hai, ThÃ©oden decides to move his citizens to the protection of Helm's Deep, but Gandalf departs to find the Rohirrim led by ThÃ©oden's nephew Ãomer. Aragorn strikes up a friendship with ThÃ©odenâs niece Ãowyn who quickly falls in love with him. During a Warg attack, Aragorn falls off a cliff into a river, but is found by his horse and taken to Helmâs Deep.
In Fangorn, Merry and Pippin attend an Ent council but learn Treebeard and the others will not participate in the war. They convince them otherwise when they show the destruction Saruman has unleashed on the forests around Isengard. The Ents storm Isengard and imprison Saruman in his tower. The Uruk-hai army arrive at Helmâs Deep, finding a makeshift army of peasants and Elves from Rivendell waiting for them. A great battle follows with ThÃ©oden losing hope until Aragorn convinces him to ride out and meet them. Gandalf and the Rohirrim arrive, turning the tide of the battle and destroying the Uruk-hai.
Frodo, Sam, and Gollum are taken to the fallen Gondor city Osgiliath but they are attacked by the NazgÃ»l and Mordor army. Sam informs Faramir of how the Ring nearly drove Boromir mad, stunning Faramir. Frodo is nearly captured by the NazgÃ»l but Sam tackles him down a flight of stairs, saving him. After the attack ends, Faramir frees the trio and sends them on their way. Gollum, hurt by Frodoâs seeming betrayal, decides to reclaim the Ring by leading Frodo and Sam to a creature he refers to as âherâ, leading them away towards Mordor.

Question: Why did Gollum stop Frodo and Sam at the black gate?
Answer: He said it's too risky