Cannot set menu link content field values in *links.menu.yml
Menu links discovered in *.links.menu.yml are not menu link content entities and therefore don't contain the field you have added to the entity. If you want to fill this field with data programmatically, create an instance of the entity:

$link = MenuLinkContent::create([
  'title' =&gt; 'Article',
  'menu_name' =&gt; 'main',
  'bundle' =&gt; 'menu_link_content',
  'link' =&gt; [['uri' =&gt; 'entity:node/1']],
  'custom_field' =&gt; 'custom content',
]);
$link-&gt;save();




The content of *.links.menu.yml seems a bit odd. The title field is the only required value and you can see that the link is discovered and the title is displayed in the screenshot. The other values are optional. Check the documentation about which values you can use in this file https://www.drupal.org/docs/8/api/menu-api/providing-module-defined-menu-links



The field seems to be for some kind of access control. You shouldn't do this in the menu link. Instead control the permissions of the target. Menu items are only displayed for users who can access the target.