function boldFirstPart() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var cell = sheet.getRange("A1");
  var text = cell.getValue();

  var separator = " - ";
  var splitPos = text.indexOf(separator);

  if (splitPos > -1) {
    var richText = SpreadsheetApp.newRichTextValue()
      .setText(text)
      .setTextStyle(
        0,
        splitPos,
        SpreadsheetApp.newTextStyle().setBold(true).build()
      )
      .build();

    cell.setRichTextValue(richText);
  }
}