When you get a login code for an account you don’t have

What to do if you receive a text with a two-factor authentication code from a service you’ve never registered for.