Being a hero sometimes means taking decisive action, which Bilbo did with the spiders and when the party was surrounded by the elves. But sometimes being the hero means waiting and watching and waiting some more.
Bilbo knew that one ring wasn’t much worth when there were 13 dwarves to rescue, so he waited. Even in his misery, he wasn’t about to attempt the impossible. Yet in his waiting, he was all the time learning. He learned where the dwarves were, and he learned his way around the halls. He learned about the waterway and trapdoor. He learned about the feast and the barrels to be sent back down river. And as his knowledge grew, a plan was hatched. It was not perfect, but it was formed around his knowledge.
So heroism is not just barging into a fight with spiders, risking life and limb for the sake of one’s friends. Heroism is also using the knowledge one gains over time to make the most of a difficult situation, and then having the courage to implement the imperfect plan.