GitHub has changed the default branch from master to main, but repositories created before the change may still be master.
You can git switch them by creating the following alias and running the gitswdb.

alias gitswdb="git switch $(git symbolic-ref refs/remotes/origin/HEAD | cut -f4 -d'/')"

If you are using git checkout, rewriting switch to checkout should work.