update_user_meta() does not work

You set the variable $user before you created this user..

It should be like this and you need to check if the user already exists

$user = get_user_by("email", $email); // Its return you the user object
if($user) {
    update_user_meta($user->ID, "quiz_scores", $score);
} else {
    $user_id = register_new_user($email, $_SESSION["email"]);
    update_user_meta($user_id, "quiz_scores", $score);
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)