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