In Germany, the student is typically owner of the copyright (including Verwertungsrechte) their thesis.
These theses are parts of exams (Prüfungsleistung). Such work must be solely produced by the student, and the thesis typically also contains a declaration specifying this. This implies that the work is owned by the student.
You can read through the forms you signed and the exam regulations (Prüfungsordnung): if no exclusive transfer of rights is mentioned, they are yours for sure. If an exclusive transfer is mentioned it is probably void according to the source I link below.
Exam regulations forbid that the professor (who's considered a public official person for the exams) or the university accept anything from the student that is not specified by the exam regulations. IP rights are not in that list. The university can and does ask for a certain number of copies of the thesis (in paper and/or electronically), this comes with a license to use these copies, e.g. to put then into their archive and to make them available in the university library (the same kind of license you get when buying a book). However, I have not yet seen an exclusive transfer of rights in that context. AFAIK the Prüfungsordnung can also specify that the thesis has to be published, though I have met that requirement only for PhD theses.
Students are typically not employees at the university. Often the exam rules explicitly forbid that students can be paid/hired by the university for the thesis. Thus, IP rights could only be transferred to the university by an explicit contract. However, contracts saying that "all transferable rights on the thesis go to university otherwise you cannot do your thesis here" are void because they are considered to be established under undue pressure to the student, and are considered acceptance of benefits by a public official (Vorteilsannahme). There seem to be ways of having a valid contract before the exam that transfers the IP to university, but I gather this is rather complicated to get right.
After the exam is finished and the student has grades and certificates, valid contracts to transfer rights to the university can be negotiated.
Source and highly relevant reading (in German) Helmut Messer: Rechtsgrundsäte zu Diplomarbeiten.