How to get the name of the homepage’s menu?

You can use get_nav_menu_locations() to get an array of locations that are being used (a menu has been assigned to it), it shows like this:

Array
(
    [header-menu] => 4
    [extra-menu] => 6
)

the 4 and 6 are the menu IDs, i think you already have an ID so this should be enough, now the thing is, if there is no menu location being used or there is no location at all the array will show empty, that doesnt mean a menu isnt being shown, because in the theme there could be a wp_nav_menu( array( 'theme_location' => 'whatever' ) ) being used and WordPress will:

By default, WordPress displays the first non-empty menu when the
specified menu or location is not found

in that case you can get a list of menus using get_terms( 'nav_menu' ), it will show an array like this:

Array
(
    [0] => WP_Term Object
        (
            [term_id] => 6
            [name] => Another Menu
            [slug] => another-menu
            [term_group] => 0
            [term_taxonomy_id] => 6
            [taxonomy] => nav_menu
            How to get the name of the homepage's menu? => 
            [parent] => 0
            [count] => 2
            [filter] => raw
        )

    [1] => WP_Term Object
        (
            [term_id] => 4
            [name] => Main Navigation Menu
            [slug] => main-navigation-menu
            [term_group] => 0
            [term_taxonomy_id] => 4
            [taxonomy] => nav_menu
            How to get the name of the homepage's menu? => 
            [parent] => 0
            [count] => 12
            [filter] => raw
        )

)

you can check which one is the non-empty menu checking the [count] value, or you can find the first empty one and add your menu item since i see that is your objective.

Here is a code to loop all menu items of all menus:

$menus = get_terms('nav_menu');

foreach ($menus as $menu) {//we loop all menus
    $menu_id = $menu->term_id;//we get the ID

    $menu_items_array = wp_get_nav_menu_items($menu_id);//we get the menu

    foreach ($menu_items_array as $menu_item) {//we loop all the menu items of the menu
        if($menu_item->post_name == "home") { //you can add more conditions here to check if its the home link


            //THIS IS THE HOME MENU ITEM

            echo "<pre>";
            print_r($menu_item);//here a list of values that you can use 
            echo "</pre>";
        }
    }
}