Same way you add a subscript. Move the cursor outside the inset with the underbrace, and add the subscript, e.g. with the _ key, or the button on the toolbar.
So after adding the text with underbrace:
Hit the right arrow key →. Note the inner markings disappear, indicating you're outside the inset for the underbrace.
Now add the subscript, and you get this, where you type whatever text you want.