In the example, we are setting the default role to ‘Subscriber’, but you can set your desired role by editing the ‘$args[‘role’] = ‘subscriber’;’ entry.
add_filter('woocommerce_new_customer_data', 'wc_assign_custom_role', 10, 1);
function wc_assign_custom_role($args) {
$args['role'] = 'subscriber';
return $args;
}