Short answer: partly, but the monarchy is much older
The British monarchy did not begin with Germans. It goes back to Anglo-Saxon kings and was later shaped by the Normans, Plantagenets, Tudors and Stuarts. But the royal house in the modern era does have a strong German ancestry, which began in 1714 and continued through the nineteenth century.
How a German prince became king in 1714
When Queen Anne died in 1714 with no surviving children, the Act of Settlement of 1701 required the throne to pass to a Protestant heir. The closest Protestant relative was Sophia, Electress of Hanover, a granddaughter of James I, and when she died shortly before Anne, her son George became king as George I. He was ruler of Hanover in Germany and spoke German as a first language. His successors in the House of Hanover continued to rule both Britain and, for a time, Hanover.
Readers wanting more of the story can look into whether the British royal family is Hanoverian, and the german ancestry of the royals more widely.
Victoria, Albert and the German dynasty name
Queen Victoria had a German mother and married her cousin Prince Albert of Saxe-Coburg and Gotha. The throne passed through her to her son Edward VII, and the royal house took the name of Albert’s family. Victoria also had many children and grandchildren who married into other European royal families, including German ones, and this reinforced the family’s German links. Whether she herself was entirely German is a different question: she was not, since her ancestry also included British roots.
The 1917 change to Windsor
In 1917, in the middle of the First World War, George V changed the family name to Windsor. The change reflected public hostility toward Germany at a time when Britain was at war with it. The king also dropped German titles held by relatives in Britain.
How German is the family today?
The family is a mix. In the direct line, Elizabeth II had German ancestors through the Hanoverians and Coburgs, but she also had Scottish and English ancestry through her mother and earlier royal lines. Her husband Prince Philip came from the Greek and Danish royal families, with strong German connections. King Charles III, as their son, has all of these. So the family is descended from many nationalities, and the notion of a purely German or purely British royal family is too simple.
What was there before the Germans
Before the Hanoverians the Stuarts held the throne, and before them the Tudors, who had Welsh roots. Earlier still were the Plantagenets, whose origins lay in France, and the Normans, who came from Normandy. The Anglo-Saxon kings preceded them all. In other words, the royal family has been “foreign” in some sense at several points in its history, which is part of why the question of an original nationality is hard to answer.