add_action wp_head from code block?

Hi,
I’m new to both WordPress and BricksBuilder so probably a silly mistake on my part but I want to write custom meta tags from a Code block on a specific page however my action never seems to get called. With the following block the test1 meta tag doesn’t appear in the header but the test2 meta tag does appear in the body

<?php
  add_action('wp_head', function () {
   echo '<meta property="test1"/>';
  });
  echo '<meta property="test2"/>';
?>