How can I move the underline farther from the text?

When I set text to be underlined, the line is very close to the text

I would like it to appear farther away, more like this:

Is that possible?

I’d recommend you create a separate line using the line tool with Option + Shift to get a straight line that isn’t connecting, and then group it to the text. Otherwise, the underline that you see is part of the macOS text handling system, and there isn’t much of a way to control where it goes relative to the location of the text.