Switching to single sign on and turning off password login is tidy, until the identity provider is down or a redirect URL is wrong. Then nobody gets into the photo library, you included.
The way back runs inside the server container:
docker exec -it immich_server immich-admin enable-password-login
Immich answers that password login has been enabled. Reload the login page, sign in with your email and password, and repair the OAuth settings at your leisure. If your container has another name, docker ps shows it.
When everything works again you can close the door:
docker exec -it immich_server immich-admin disable-password-login
There is a matching pair for the other method, enable-oauth-login and disable-oauth-login, handy when a half configured provider is getting in the way.
Before you ever disable password login, I’d make sure the admin account has a password you actually know and have stored. An account that was only ever used through the provider may not have a usable one, and then reset-admin-password is your second step.
Anyone who can run these commands controls your Immich, which is a good reason to limit who has access to Docker on that machine. Membership of the docker group is as good as root there.
Further reading: Immich server commands
Going deeper: Guide: link Prowlarr to Sonarr and Radarr once, and stop typing indexers into every app