Try this walker.
Example usage:
wp_nav_menu( [
'menu_class' => 'menu-horizontal text-left',
'container' => '',
'depth' => 2,
'theme_location' => 'main-menu',
// You should have loaded the class-my-bs-walker-nav-menu.php file from
// within the theme's functions.php file.
'walker' => new My_BS_Walker_Nav_Menu,
] );
The walker is not intended as a “global” walker for any Bootstrap menus; instead, it was intended just for the menu structure that you provided in your question.