How get access special field value?
I suggest you two solution one based on what you tried to did 

First solution

in yourthemename.theme 

if ($variables['node']-&gt;getType() == 'YOUR_CONTENT_TYPE') {
    $variables['My_Field'] = $variables['node']-&gt;get('YOUR_FIELD')-&gt;value;
  }


and in your custom node template

   {{ My_Field }}



  Tips: Those of "YOUR_CONTENT_TYPE" and "YOUR_FIELD" are
  machine names for your content type and your content field.


Second solution

in your content type node template file ( I mean if your content type name is News in node--news.html.twig) try to add your custom value to it with:

  {% set My_Field = node.YOUR_FIELD.value
      {# Make your manipulation here #}
   %}
   {# And then print it back wherever you like with below code: #}
  {{ My_Field }}