What can I do to avoid being stuck being able to do nothing in Settlers of Catan?
There are many ways to win at Settlers. The only type of starting position which limits your options is the one you described - good access to wood and brick but not much else, and then getting hemmed in. This situation doesn't happen too often in our group because the more experienced players usually dissuade newer or poorer players from placing an initial settlement that has a strong likelihood of leading to a disastrous outcome - which reduces the chance of a tedious game for all.

However, I've seen many poor starts in Settlers that ended in victory. I have two sections worth of thoughts for you describing the advantages of starting out behind, and the various ways I've seen players come back after a poor start.

The advantages of starting from behind:


other players more willing to trade with you
you can drive a harder bargain in trades (i.e. you must give me 2 cards to get the 1 you need, or you must give me 3 cards to get the 2 you need)
the robber gets put on you less often
when the robber does get put on you, the card is drawn from a different player's hand if hex is shared
people don't pay as much attention to what you're doing, so you can be secretly planning for your dramatic surge to victory without everyone pointing out what you're planning (good players tend to carefully monitor and point out who is close to winning and why but often neglect this analysis for those who trail by a lot)


Various ways to win with seemingly poor initial starting positions


monopolize a scarce resource and obtain advantaged trades (something the player going first is sometimes best positioned to do)
go for a 2:1 port strategy if circumstances allow
if placing first, consider carefully where the good settlement sites are for initial placement. You might purposely shift to a slightly worse settlement site because it is obvious nobody else will place near it (or maybe one side will obviously be open for expansion). You will often need to very carefully place the second settlement to preserve a swath of territory for yourself to pull off this strategy. I have often started slow because I purposely chose slightly worse resources for this reason, but had far more expansion territory than the other players who end up crowding each other while I slowly catch up and eventually surpass them.
Ultra-cooperate your way to a chance at victory. I had a game recently where I got off to an extremely unlucky start getting cut off from my two best expansion possibilities (which literally had only a 1/6 chance of happening). Another player also started poorly and we both still had 2 settlements while the other two players already each had 4-5 VPs worth of cities and settlements each. So we started doing hugely helpful trades to each other - so he would give me an ore for my whole hand on one turn so he could build his first settlement. Then I gave him a brick for his entire hand to build my first city . . . and so forth. We broke off cooperation when we were both in the lead and he won but you get the idea.
Get other players fighting against each other. Point out who is winning and why, and convince everyone to gang up on that person until someone else gets the lead then do the same thing to that person. That can give you a lot of time to catch up.
Most important: Make sure you have some way to access wheat and ore, even if it's just a way you can expand to get them or someone who you're pretty sure will be willing to trade with you (See Which of the 5 resources in Settlers of Catan (base version) is most important? Why?). You have many more options with these resources, whereas brick/wood strategies require either a port (preferably 2:1) or lots of expansion territory to work. I literally once won a game without any brick or wood, and without building a single road, when I was cut off early (see picture below: white, with 15 development cards)