How to change view's field (Custom-Text field specifically) value based on other field value using hook_view_pre_render?
You can't set a value for "nothing" aka "Global: Custom text" in hook_views_pre_render() because _entity is the entity object. The entity (Taxonomy Term in your case, and Node in my test case) does not contain this field.

Therefore, you need to use template_preprocess_views_view_field

function THENAME_preprocess_views_view_field(&amp;$vars) {
  if(isset($vars['view']) &amp;&amp; ($vars['view']-&gt;id() == 'test_view') &amp;&amp; ($vars['view']-&gt;current_display == 'block_2')) {
    if (isset($vars['view']-&gt;field) &amp;&amp; (count($vars['view']-&gt;field) &gt; 0)) {
      if ($vars['field']-&gt;field == 'nothing') {
        $tid = $vars['row']-&gt;_entity-&gt;get('tid')-&gt;value; // get tid
        if ($vars['field']-&gt;field == 'nothing') {
          $vars['output'] = [
            '#markup' =&gt; "&lt;h1&gt;This is my custom mark-up with term id: $tid&lt;/h1&gt;",
          ];
        }
      }
    }
  }
}