If you play a melody and have to jump to a neighboring string within the same fret, you can use a finger roll so you don’t have to change position.

To do this, play the first note with the tip of your index finger. Then to play the second note, simply roll onto the flat of the finger to press the b string in the same fret. This motion is only done by the finger itself, don’t do it with your wrist or arm.