Enter user registration information in the database

There are a few things to note:

  • there is no error checking on wp_insert_user, so there’s no way to know if it failed and why
  • wp_insert_user can be used to set the role etc, the follow up calls aren’t needed, if you read the official docs, there are parameters for those fields
  • Never modify the WP Core database tables yourself, if you need extra columns, store the data in user meta, any changes you make get undone and overwritten when WP updates its database table schema, all that extra data would be lost

So, lets do it this way:

$user_data = [
    'user_login' => $nickname,
    'user_pass'  => wp_generate_password(),
    'user_email' => $email,
    'first_name' => $nome,
    'last_name' => $cognome,
    'role' => 'bronze_member_ga'
];
$user_id = wp_insert_user($user_data);

Then confirm that it actually created the user, and if not, why it failed:

//On failure
if( is_wp_error( $user_id ) ) {
    wp_die( "Failed to create user: " . $user_id->get_error_message() );
}

Update: Based on your responses it would appear that several assumptions you’ve made are untrue, specifically that $nickname has a value and is valid

So lets add a validation and sanitisation step before filling $user_data:

if ( empty( $nickname ) ) {
    wp_die( 'Failure: $nickname is empty and must have a value' );
}
if ( !is_email( $email ) ) {
    wp_die( 'Failure: $email is not an email' );
}
if ( empty( $nome ) ) {
    wp_die( 'Failure: $nome is empty and must have a value' );
}
if ( empty( $cognome ) ) {
    wp_die( 'Failure: $cognome is empty and must have a value' );
}

For your database changes, you should instead make use of update_user_meta and get_user_meta to store the additional values. Using extra columns in the user table will cause problems, and data loss on WordPress updates