The mistake is with this line:
// Add the school ID as a meta data
add_user_meta( $user_id, 'school_id', [$school_id] );
No need for the array brackets when you store the user meta, change it to:
// Add the school ID as a meta data
add_user_meta( $user_id, 'school_id', $school_id );