I have been using my university private gitlab for a while. I have a lot of commit that can be shown like this
Accroding to docs:
Commits must be made with an email address that is connected to your account on GitHub.com, or the GitHub-provided noreply email address provided to you in your email settings, in order to appear on your contributions graph.
So, you can add email address which you commit on Gitlab to your Github account. After this, the contributions will be counted and shown.
Follow this guide to set up your commit email address on Github: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address#setting-your-commit-email-address-on-github