This worked, but it takes a couple of days.
Step 1: give admin user a password
Log in https://entra.microsoft.com/ with your Outlook account, go to users, edit user admin and enter a password. You can now login with this account. Write down the admin email address and password. The email domain will be used in step 2. Let's assume the domain is Pipo123.onmicrosoft.com, so the email will be admin @Pipo123.onmicrosoft.com.
Step 2: delete license
Log in the Office365 Admin center https://config.office.com/ and use the admin email address. Click Sign in options.

Click Sign in to an organization.

Enter the email domain, so Pipo123.onmicrosoft.com. You can now log in with admin email address .
Step 3: delete the Microsoft Teams (free) license
In the 365 office center navigate to licenses and delete the Teams license. You will get an email confirmation when the deletion is complete. This will take a couple of days as a security measurement. Continue with step 4 the day after this date.
Step 4: delete the tenant in Entra
Log in the Entra portal [ https://entra.microsoft.com/] with the admin account. Go to overview and manage tenants. You can now delete the Teams tenant. There might be a warning to remove another requirement. You can do it here by clicking that row. All requirements for deleting the tenant should be green now and you can actually delete it.
Once the tenant has been deleted, the Entra portal becomes unstable. It can no longer fetch access tokens. A couple of minutes later the Entra account will be gone and you can no longer log in with the admin email address or your Outlook account.
Step 5: sign out from teams
Start Teams and notice it still shows the error. Sign out from teams. Sign in and now the extra domain should be gone and everything is good again.