Error when setting GitHub - first remote repository

I’m doing the Git course.
https://www.codecademy.com/courses/learn-git/articles/f1-u3-git-setup
I have a GitHib account and I have installed Git bash

In ‘Your first remote repository on GitHub’ I have done no 1- 5 of the instructions. In no 6 I have copied the lines in ‘… or push an existing …’ but when I run the lines in Git bash I get an error

/c/Users/Sanne/git_practice

: git remote add origin https://github.com/SanneLP/git-practice.git
: git branch -M main
: git push -u origin main
error: src refspec main does not match any
error: failed to push some refs to ‘https://github.com/SanneLP/git-practice.git

Can someone please help me what to do? Thanks

Are there any commits on that branch at present? I think this reply and the link contained within it might be useful for you-