Access menu links from a module
You are probably just missing the build() call.

$menu_name = 'my-custom-menu';
$menu_parameters = \Drupal::menuTree()-&gt;getCurrentRouteMenuTreeParameters($menu_name);
$tree = \Drupal::menuTree()-&gt;load($menu_name, $menu_parameters);
$renderable = \Drupal::menuTree()-&gt;build($tree);
print \Drupal::service('renderer')-&gt;render($renderable);


Core is the best example for these kinds of things. I pulled the above from SystemMenuBlock::build().