This is a popular git workflow. It won’t work for everyone, but it works for a lot of people.
When you do new work, do it on a a branch in your git repo.
When you’ve done a bit of work, commit it to your repo, and push it back to origin. Caution - this code will be visible to anyone, it is not private.
In github, make a “pull request” to eventually merge your branch back into master. The gibhub PR gives you a super easy way to see the changes you have made on your branch. after any push to origin, the GitHub UI will show a button to make this PR in a single button press.
When your branch is “done”, merge it back to master, and think seriously about doing a “squash merge”. Squash merge makes a single commit to master that has all your changes, rather than replaying every change that you made on your branch into master. In any case, it is easy to do either kind of merge from the GitHub UI.
Squash merge keeps your history a little “cleaner”, and it will reduce the size of your repo (and hence the time it takes to clone it). Disadvantages are the you don’t have an accurate record of exactly when each line of code was changed. More importantly there are some complex branching scenarios that become very difficult to merge if you use squash merges. Like if your branch master -> a -> b, and then squash merge a -> master it will be very difficult to merge b -> master.