if role is logged in then do something

Something like this would be more efficient. This is basic PHP by the way, not WP specific.

function add_extra_item_to_nav_menu( $items, $args ) {

    $roles = [
        'administrator' => [ //Role - slug name
            'SCHOOL_NAME-A', //url path - appended to the end
            'ADMIN', // can be any name - appended to SHOP NOW button
        ],
        'ROLEABC' => [
            'SCHOOL_NAME-B',
            'ABC',
        ],
        'ROLEXYZ' => [
            'SCHOOL_NAME-C',
            'XYZ',
        ],
    ];

    foreach ( $roles as $role => $menu ) {
        if ( current_user_can( $role ) && is_user_logged_in() && $args->menu-5 ) {
            $items .= '<li><a href="/product-category/public/' . $menu[0] . '/" class="navShopNow fungula">SHOP NOW ' . $menu[1] . '</a></li>';
            break;
        }
    }

    return $items;
}