There are different ways to authenticate to web services
The most popular ones are:
Others include the using Local Protocol and the Git Protocol
You can use your username and password/token to authenticate over HTTPS.
To avoid having to repeat this process every time, you can use the Git Credential Manager, which will cache your credentials for you.
Setup info: GitHubGitHub recommends using HTTPS in their docs, but it supports SSH too.
You can also authenticate using SSH keys.
To do that, you can just upload your public SSH key to the service you're using.
Just remember to use the SSH URL when cloning your repositories.
Setup info: GitHub, GitLabGitLab recommends using SSH but, like GitHub, it supports both ways.