UK citizens may stay in Germany (and the Schengen Area) for up to 90 days within any 180-day period without a visa.
For stays exceeding 90 days (work, study, family reunification), a German national visa (Type D) must be obtained from the German embassy/consulate in the UK before travel.
Since January 1, 2021, UK nationals are third-country nationals subject to Schengen rules. The 90/180 rule applies cumulatively across all Schengen countries.