In case you´ve the next problem here is the solution.
$ git push -u origin main
error: src refspec main does not match any
error: failed to push some refs to 'https://github.com/XxxxxXxx/XXX.git'
Just need to make a commit before trying to make the first push to a repository.
$ git commit -m "Inicial commit"
[main (root-commit) 875384b] Inicial commit
4 files changed, 259 insertions(+)
create mode 100644 css/index.css
create mode 100644 css/reset.css
create mode 100644 favicon.ico
create mode 100644 index.html
Trying to make another push to the remote repository in Github.
$ git push origin main
Everything up-to-date
Succesful result.
I hope this helps.