Please stop creating PDO sessions everywhere. I estimate that there are roughly 15-20 mysql connections/request. You can prepare more than one statement per PDO session. None of these PDOs are closed properly after being used, so all throughout the duration of the request, there's just dangling PDO sessions.
$pdo = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
...
$insertDB = $pdo->prepare("INSERT INTO user (sid, uuid, oauth_uid, oauth_provider, email, picture, locale, description, main_ip) VALUES (:sid, '$v5uuid', :id, 'Discord Inc.', :email, :picture, :locale, :description, :mainip)");
$insertDB->execute(array('sid' => $sid, 'email' => $email, 'picture' => $fileName, 'description' => "No Description Set.", 'mainip' => $main_ip, 'id' => $uid, 'locale' => "-"));
$servernameP = $mysqlPayment['servername'];
$usernameP = $mysqlPayment['username'];
$passwordP = $mysqlPayment['password'];
$dbnameP = $mysqlPayment['dbname'];
$pdoPayment = new PDO("mysql:host=$servernameP;dbname=$dbnameP", $usernameP, $passwordP);
$insertUser = $pdoPayment->prepare("INSERT INTO payment_user (oauth_provider, oauth_id, uuid, username, email, country_code) VALUES (:provider, :id, :uuid, :username, :email, :country)");
$insertUser->execute(array('provider' => "Discord", 'id' => $uid, 'uuid' => $v5uuid, 'username' => $_SESSION['user_username'], 'email' => $email, 'country' => $user->locale));
$select = $pdo->prepare("SELECT * FROM user WHERE uuid = :uuid");
$select->execute(array('uuid' => $v5uuid));