The Anglo-German naval arms race of the early 20th century preceded and was one of the several intertwined causes for World War I.
There were also other naval buildups in several other countries which were emerging as great powers, such as the United States and Japan, and in South America.
Anglo-German naval arms race Wikipedia
The United Kingdom had the largest navy in the world and so in accord with Wilhelm II’s enthusiasm for an expanded German navy, and his own strong desires, Grand Admiral Alfred von Tirpitz, Secretary of State of the German Imperial Naval Office, championed four Fleet Acts between 1898 and 1912 to greatly expand the German High Seas Fleet. The German aim was to build a fleet that would be 2/3 the size of the British navy. This plan was sparked by the threat of the British Foreign Office in March 1897, after the British invasion of Transvaal that started the Boer War, to blockade the German coast and thereby cripple the German economy, if Germany were to intervene in the conflict in Transvaal. From 1905 on, the British navy developed plans for such a blockade that was a central part of British strategy.
In reaction to this challenge to their naval supremacy, from 1902 to 1910, the British Royal Navy embarked on its own massive expansion to keep ahead of the Germans. This competition came to focus on the revolutionary new ships based on HMS Dreadnought, which was launched in 1906.
By 1913, there was intense internal debate about new ships due to the growing influence of John Fisher's ideas and increasing financial constraints. It is now generally accepted by historians that in early-mid 1914 the Germans adopted a policy of building submarines instead of new dreadnoughts and destroyers, effectively abandoning the arms race, but kept this new policy secret so that other powers would be delayed in following suit.
The naval race between Britain and Germany generated massive public support on each side. In the midst of the race, the British public coined the slogan 'We want eight and we won't wait!', referring to the number of dreadnoughts they wanted the government to build. With the surge of public support, the government did commission more shipbuilding.
British defense policy was to ensure that the British navy was at least the size of the next two largest navies as outlined in the Two Power Standard. This was not the case as the war approached, thanks to financial and logistical constraints, and due to the speed of expansion of the German navy and the US Navy. Britain did, however, boast the largest and mightiest navy when war broke out in 1914.
Britain managed to build HMS Dreadnought in just 14 months and by the start of the First World War Britain had 49 battleships, compared with Germany's 29. Although the naval race continued it was economically impossible for the Germans to close the gap before the war broke out.
In 1912, the German chancellor Bethmann Hollweg ended the naval arms race. His aim was to secure an understanding with the British to end the more and more isolated position of Germany. The increasing size of the Russian army compelled the Germans to spend more money on their army and therefore less on the navy. This initiative led to the Haldane Mission. Germany proposed a treaty in which Germany would accept British naval superiority in exchange of a British neutrality in a war in which Germany could not be said to be the aggressor. This proposal was rejected by Britain. For Britain there was nothing to gain by such a treaty since their naval superiority was insecure, although the British Foreign Secretary Sir Edward Grey favoured a more assertive policy against Germany.