I think you have to stage and commit files first to create the HEAD (or something), then you should be able to use use_github() to initialise the remote.
I think @francisbarton is right. You appear to have initialized a Git repository, but haven't created the first commit. I can recreate the error by running git2r::init() before running usethis::use_github().
If there is no Git repository:
> use_github()
ā Setting active project to 'C:/Users/BLISCJX/Documents/test'
Error: Cannot detect that project is already a Git repository.
Do you need to run `use_git()`?
If you initialize the Git repository, but don't create the first commit:
> r <- git2r::init()
> use_github()
ā Checking that current branch is 'master'
Error: Detached head; can't continue
In general, if you run usethis::use_git() first (it initializes the repository and also creates a first commit), then you can use usethis::use_github() afterwards.