remove wp admin menu by customer user role

You can use wp_get_current_user() function to get current logged in user’s role

//Remove admin menu items if not admin

function remove_admin_bar_links() {
    global $wp_admin_bar, $current_user;

     $user = wp_get_current_user();
     if ( in_array( 'author', (array) $user->roles ) ) {
         $wp_admin_bar->remove_menu('updates');          // Remove the updates link
         $wp_admin_bar->remove_menu('comments');         // Remove the comments link
         $wp_admin_bar->remove_menu('new-content');      // Remove the content link
         $wp_admin_bar->remove_menu('wp-logo');          // Remove the WP Logo link
         $wp_admin_bar->remove_menu('wpseo-menu');       // Remove the Yoast SEO menu
     }
 }
 add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );