Codeberg is fully open source(forgejo) while gitlab has an open source core+community edition but a source available propietary enterprize edition.
Codeberg is a nonprofit with no ulterior motives. Gitlab is a publicly traded for profit entity with a goal to make profit
This could just be me, but codeberg feels a lot more transparent. When they have outages, they explain why.
Super minor, but the codeberg team "self-hosts" their own servers so you only need to trust the one entity rather than additionally trusting the server provider.
self-hosting is great but that still means datacenter someplace. I've been using GitLab for some time now and CodeBerg "feels weird" to me. But then it could be my biases and "muscle memory". I'd say whatever feels right for you.
Unlike other big name Git hosting company who chose to use AI to "steal" from hosted projects other two did not stoop that low. So there's that.
You are comparing GitLab (the application) with codeberg.org (the website operated by the codeberg e.V. non-profit). A fair comparison would be gitlab.com (the website operated by GitLab Inc.) with codeberg.org or GitLab (Community Edition or Enterprise Edition) with Forgejo (the application powering codeberg.org). They can be fully self-hosted and are both planning to implement AcivityPub-based federation.
I trust them, but I just want to have it by myself.
You do realise you can selfhost Forgejo and you do realise Git is actually distributed? You can easily mirror repositories on multiple instances or even your home computer.
The biggest part to me about Git federation is the stuff around it: Issues, PRs, discussions. With regular mirrors you have to create an account on every instance just to open an issue. I guess in the end it's just circling back to mailing lists but in a different way.