GitHub is the center of gravity for open source - not just git hosting, but pull requests, issues, Actions, and a social graph that is effectively the public face of a project. For collaboration and visibility there is no real substitute, and that is worth being honest about: leaving does not replicate its network. What it can replicate is the hosting. Some teams simply want their repositories on their own infrastructure - to keep private code off a Microsoft-owned platform, to avoid usage tiers and outages outside their control, or to run a lightweight forge without a heavy deployment.
The open source alternative below is a self-hosted git server in that spirit: repositories, pull requests, issues, and a familiar web UI, running from a single modest binary on hardware you control. It won't hand you GitHub's audience or ecosystem, but for hosting and reviewing code on your own terms - fast to stand up, cheap to run, fully yours - it covers the part that actually has to be self-hosted.