wp_nav_menu doesn’t seem to work on custom post type pages

You can just add these parameters in array variable and pass this to wp_nav_menu() Like:

function get_menu_params(){

    $defaults = array(
        'menu'              => 'Primary Menu',
        'theme_location'    => 'primary',
        'depth'             => 3,
        'container'         => 'div',
        'container_class'   => 'a',
        'container_id'      => 'b',
        'menu_class'        => 'nav navbar-nav',
        'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
        'walker'            => new wp_bootstrap_navwalker()
    );                          
    return $defaults;
}

and call it on the custom post type pages like below:

wp_nav_menu( get_menu_params( ) );

This will help you.