Step 1. Go to github.com and create an account.
Step 2. Download git and github desktop for your pc.
Now, give a name for your repository and give description about it. Click on the, readme checkbox to add Readme.md file to your repository which will let other users get an idea about your repository. Finally click on create. This will create your repository locally on your machine.
Now click on open in visual studio code to open your repository and start coding.
As soon as you start coding it git starts tracking your changing that's where version control comes to save our life.
come back to github desktop and you can see your changes done.
Now, commit your changes by clicking commit to main.
Once done with commit now you're ready to publish your repository to github.
Remember to uncheck the private, to keep your repository public so other users can see and go through your code.
Now go to github.com and you can see your repository there.