This is incorrect.
First of all, GitHub is a service built upon Git. There is no requirement that you need to use GitHub. And there are other options, what you call "hubs", such as GitLab or SourceHut.
Git as a VCS, has the feature to sync with other repositories elsewhere. These can be somewhere else on your computer, someone else's computer, or a server. GitHub happens to be one of those servers.
----
edit: if this was sarcasm, mb