Need help changing repository default branch

My repository default branch is currently set to main which cannot be deleted or renamed. Is there any way to change this and set the default branch to something else?