How to programatically hide node field on viewing?
You could make use of the hook_preprocess. If its on the specific entity such as the case of a paragraph it will look something like this where I am hiding some labels from a view based on some condition:
function [MODULE_NAME]_preprocess_paragraph(&amp;$variables){
    $paragraph = $variables['paragraph'];
    // Get the parent bundle.
    $parentBundle = $paragraph-&gt;getParentEntity()-&gt;bundle();
    //check View type
    if ($parentBundle &amp;&amp; $parentBundle == 'category_views') {
      if ($variables['content']['field_language_name']['#object']-&gt;get('field_language_name')-&gt;value != 'English') {
       //Removing labels
        unset($variables['content']['field_language_name']);
        unset($variables['content']['field_language']);
      }
    }
}