Imperial rivalry: Britain and Germany were competing for control of colonies and resources in Africa, the Middle East, and Asia. This competition led to a number of diplomatic crises, such as the Fashoda Crisis of 1898 and the Agadir Crisis of 1911.
Naval arms race: In response to Germany's rapidly expanding navy, Britain launched a naval arms race in 1906. By 1914, Britain had a significant advantage over Germany in terms of naval power, which further strained relations between the two countries.
Isolationism: Britain had traditionally pursued a policy of "splendid isolation" in international affairs, but began to form closer ties with other countries in response to Germany's growing power. This led to the formation of the Triple Entente between Britain, France, and Russia in 1907.
Economic competition: Britain and Germany were also competing economically, particularly in the areas of shipbuilding, steel, and chemicals. This competition led to a number of trade disputes, such as the Tariff Crisis of 1903.
Persecution of British subjects: The German government increasingly persecuted its own citizens and discriminated against British expats and trade partners in the region.
All of these factors contributed to the deterioration of relations between Britain and Germany in the years leading up to World War I.