How can I access the main menu in template_preprocess_page? I would like to assign the main menu of my site to a variable using template_preprocess_page() so that I can just use something like {{main_menu}} in the page template. Any ideas on how I would go about doing this, without having to assign the Menu to a Region?
Remember your menu can be a block, and to render it, you just have to load and get its view in a preprocess function.

THEME.theme file  

use Drupal\block\Entity\Block;
function THEME_preprocess_page(&amp;$variables) {
  $menu = Block::load('id_main_menu');
  $variables['main_menu'] = \Drupal::entityTypeManager()-&gt;getViewBuilder('block')-&gt;view($menu);
}


page.html.twig

...
{{main_menu}}
...


Attention
You must create your block 'main_menu' in somewhere, (module install, block structure page...)