You can transfer to another university in Germany if you want to continue studying the same subject but at a different institution. In this case, you can apply for admission to an advanced semester of the respective program.
Find out more about applying for admission to an advanced semester of a bachelor's program
Further information on applying for admission to an advanced semester of a master’s program