I don’t think there is an existing “wp_nav_menu_menu-main-menu_items” filter and as far as I am aware, you wouldn’t be able to add the root Ul element’s class with the existing “wp_nav_menu_items” filter either. So you need to find the file in your theme (header.php?) where wp_nav_menu()
is used to render your menu and pass the 'menu_class' => 'sm'
option.