I found the linked descriptions of the different types of non-profit organizations in Germany helpful.
https://cof.org/content/nonprofit-law-germany
My brief takeaway is that the situation is both similar and different from the US context. In the USA corporate registration is with the state, and then when registered with the state, the organization may also register with the IRS for tax-exempt status under a variety of possible scenarios. In Germany, It becomes important to decide which kind of basic organizational structure one registers for as that determines some of the basic ways the organization must conduct it's business (outside of the public-good qualified work).