On your first lick, my pointer naturally mutes the G string at the end, when I add some vibrato, or if I just keep my pointer lightly touching the G string the whole time. My right palm slightly moves over and blocks all of the lower strings from ringing.
Another trick is to use your pick (or even your other right-hand fingers) to mute a string you're not playing. Especially while adding vibrato. Sometimes I even use a little vibrato as an excuse to mute adjacent strings. There is no "rule" for any of this... every lick is different and will require some combination of these.
Have fun with the "Yoga" of string muting.
-Carl.
Carl King
Director of Content
GuitarTricks
Los Angeles, CA