The reality is, you don’t. Pathfinder is a game where characters, at least some of them, are doubling or more in power every couple of levels. Being a level or two behind is massive. Being four or five behind basically means you could be playing different games entirely. Especially when your level is 1st—even a 2nd-level character is playing a fundamentally different game from a 1st-level character. That’s just reality in the Pathfinder system—a reality that, unfortunately, neither Paizo nor the Pathfinder Society recognizes.
On the other hand, Paizo’s published modules as well as the Pathfinder Society also mostly cater to nearly the lowest common denominator as far as optimization is concerned. If you choose a high-tier class, and optimize it well, you might be able to overcome these limitations somewhat, as long as you are playing with people who aren’t doing the same. Even if they are, you might at least be able to interface with the challenges of the games you play, even if those around you are blowing through them with ease. Still, this is likely to be a frustrating experience, it might draw the ire of GMs, and it might turn into you being the cause of problems after you’ve leveled up some and now have lower-level characters in your own party. It’s not a great solution.
But you can somewhat improve this situation by focusing on support. Support means you don’t have to interact with saving throws, AC, SR, or whatever other defenses the challenges may have—which is very good because your numbers will be difficult to get to a point where that will be anything but a waste of time. You don’t need any special boosts to provide inspire courage, for example, to your party. It won’t be much but it will add to what the party is doing. When the forces you’re alongside are devastating, being a force multiplier is effective. And it also means that when and if you level up and end up in the opposite situation, you’ll be able to support your lower-level allies and help them to survive where they aren’t supposed to be (or, at least, avoid overshadowing them as they deal with things where you aren’t supposed to be).
Semada’s answer is also good—not getting in the way is a bare minimum here to avoid a really frustrating experience for all involved. If you manage to do that much, then the game might be a frustrating experience only for you. Which isn’t much of a win, but it might be the best you can get in this situation.