I'd expect you'd still create an empty repo (same as in the web UI) and then push the branches you want to push. You don't configure a branch name in the web ui as well.
But that's why I'm asking where OP found that and not just saying they're wrong.
€: There's also https://docs.github.com/en/rest/reference/repos#update-a-rep... where you can set the default_branch?