The first basic condition for applying for a master's degree in Germany is that you have obtained or will soon obtain a bachelor's degree in related fields. Theoretically, don't ask for a four-year undergraduate course. As long as the credits meet the requirements, there are bachelor's degree certificates, five-year undergraduate courses, or adult education, in principle, you can also apply for a master's degree in related majors in Germany.
Freshmen can apply before graduation, provided that they have completed 80% of undergraduate credits. German universities generally default undergraduate credits to be above 180ECTs (European credits).