For starters, read licensing from codeberg (including their licensing page that is linked from there. Granted youre not choosing the licenses but there is good info to learn there.
Now codeberg wants free licensing. A good rule of thumb is if it's an Open Source Initiative (OSI) license then it's good. For a list of OSI licenses you can check out their page.
There may be other free and open source licenses that people use but if you know nothing about licensing then stick with the OSI ones until you get your feet wet.
You'll also want to make sure that whatever project you're using isn't using dual licensing with non-free parts. If it looks like they have multiple licenses described in their README.md or LICENSE then as a beginner i would just run away as those can be complex and you may not be able to put that code on codeberg
HOWEVER, my advice as someone who uses codeberg as my main forge is this:
- fork projects on whatever platform they are hosted and keep the forks on that platform.
- only put your own original code on codeberg.
My rationale is that part of the open source mentality is being able to give back your code contributions. Putting your code on another forge will make it so you're not able to do that unless you later add a different git remote to your fork on that forge and then merge (im ignoring the rare unicorn projects that accept contributions via email). That isn't hard to do but it's extra steps. If you fork a github project on github then you can still have a local copy in your PC and if the original policy is removed/nuked/relicensed/etc then you could dig into the licensing and see if you can put your local copy on codeberg.
My advice (from above)
So whatever code you are looking at, keep it on that platform if you are forking it.
If you have original code, then you can license it however you want and put it on codeberg if it's an OSI approved license.