You can also self-host a Forgejo instance on a €3/mo Hetzner instance (or a free Oracle Cloud server) if you want. I prefer Hetzner for their service quality and server performance.
I plan to use Source Hut for public projects.
For some research I use a private Git server. However, even that code might get released as Free Software when it matures enough.