So far, you have only renamed your remote branch from main to master. So, to change your local branch name, first, checkout branch main (if you aren't already on it)
Next, rename branch main to branch master
Then, set origin/master to track your local branch master
After this, in Gitlab, go in Setting → Repository → Default Branch ( expand it) and change the default branch Here