Git switch
git switch moves you to another branch. It does the branch part of git checkout, with a clearer name.
Use -c to create a new branch and switch to it. Git will not switch if your uncommitted changes would be overwritten: commit or stash them first.
Switch to a branch
git switch main
Switched to branch 'main'
Create a branch and switch to it
git switch -c new-feature
Switched to a new branch 'new-feature'