While D8 uses the symfony routing system and configures this with yml files and dynamic route callbacks as described by @MrD, menus are now a separate system.
The menu system offers two ways to define menu links. Static in mymodule.links.menu.yml
and dynamic as content.
To do the latter add an item to a menu by creating a MenuLinkContent
entity:
$item = \Drupal\menu_link_content\Entity\MenuLinkContent::create([
'link' => ['uri' => 'internal:/<front>'],
'title' => 'Front Page',
'menu_name' => 'admin',
]);
$item->save();
A more complex example would be how drupal generates the menu link when it saves a node: