Receiving a two-factor authentication code for a service you don't have an account with can happen if your phone number was previously owned by someone else.
This is known as phone number recycling, where the previous owner registered an account using your current phone number.
If you plan on creating an account with that service, contact their support team to detach the unknown account from your number.
Under no circumstances should you use the one-time codes to access an account that doesn't belong to you, as it is illegal and unethical.