The sequence to create a new Git branch with local changes in tact, but remove those changes from the original branch, the sequence of commands would look like this:
Note that in the above example, we used Git switch, not checkout. The Git switch command came out in 2020, and is preferred over the git checkout command.