When you log in to YouTrack via an external service for the first time, YouTrack checks if an account with the same verified email address already exists. If it exists, the credentials are added to the existing account. If not, YouTrack will create a new account with the provided credentials.
In this case, the YouTrack administrator should merge the new account with the existing one, so that OpenID/LDAP/Google/Github or other credentials will be associated with the existing user account.
For more details please check this article.