Can also use GitHub cli it's super handy for tasks like this, also use it to create repositories.
gh repo edit --default-branch <branch-name>