Clicking a menu together is, I think, the slowest part of setting up a test site. WP-CLI can do it in four lines.
wp menu create "Main menu"
wp menu item add-post main-menu 2
wp menu item add-custom main-menu "Docs" https://example.com/docs/
wp menu location assign main-menu primary
The first line creates the menu, and its slug becomes main-menu. add-post adds an existing page or post by ID. add-custom adds any link with a title. The last line puts the menu in the theme’s primary location.
Location names differ per theme. wp menu location list shows the ones your theme registers. wp menu list shows all menus with their locations and item counts, and wp menu item list main-menu shows the items with their database IDs, which you need to move or delete one.
This works for classic themes. Block themes like Twenty Twenty-Five use the Navigation block instead, which stores its menu as a wp_navigation post. There, wp menu location list comes back empty and assigning a location has no visible effect.
Further reading: wp menu, wp menu item