As a general rule, you are free to choose amongst unrestricted surnames. Using Statistics Norway's name search, you can check how many people have a particular surname.
A surname is considered to be protected if 200 or less people in Norway have it. To take a protected surname, everyone who already has that surname must give their consent.
You can also take a protected surname if you have an affiliation to the name, e.g. through kinship, marriage, adoption or a relationship to step-parents or foster parents. The case officer will contact you if documentation is required.
You can read more about surnames in chapter 2 of the Name Act.