RichText URL in cell
//OnlyCurrentDoc
function linkCellContents() {
var range = SpreadsheetApp.getActive().getRange("Link!A2");
var richValue = SpreadsheetApp.newRichTextValue()
.setText("More information")
.setLinkUrl("https://example.com")
.build();
range.setRichTextValue(richValue);
}