Using WordPress PHP code, how to bulk delete only 100 subscribers at a time from thousands of users?

Here you will find all parameters supported by get_users().

$blogusers = get_users( [
   'role'   => 'subscriber',
   // limit the number of rows returned
   'number' => 100,
] );

foreach ( $blogusers as $user ) {
   wp_delete_user( $user->ID );
}

Or return only ID:

//  $blogusers is array of IDs
$blogusers = get_users( [
   'role'   => 'subscriber',
   // return only user ID
   'fields' => 'ID',
   // limit the number of rows returned
   'number' => 100,
] );

foreach ( $blogusers as $user_id ) {
   wp_delete_user( $user_id );
}

tech