It depends on your criteria.
By the end of the Civil War, the United States had the largest Navy in the world. But this is misleading, since so many US ships were suitable only for river use or- at best- coastal use. Britain's Navy numbered 421 ships in 1865. <
http://www.navyandmarine.org/ondeck/1862foreignnavies.htm> By 1870 the US Navy numbered 186 ships.
<
https://www.bluejacket.com/usn_ship_list_1870.htm>
By 1898, the US Navy had 160 ships. By the end of WWI, 774 ships. At the end of WWII, 6768 ships. <
https://www.history.navy.mil/research/histories/ship-histories/us-ship-force-levels.html>
Britain entered WWI with the wold's largest Navy, which included 500 warships. <
http://encyclopedia.1914-1918-online.net/article/naval_warfare> At the beginning of WWII, the Royal Navy had 332 warships; by 1945, 607 warships. <
http://www.naval-history.net/WW2CampaignRoyalNavy.htm> (Note: Warships only: I do not have the overall strength for all Royal Navy vessels.)
"The U.S. Army underwent an enormous expansion during the
Civil War (1861–65), growing from a peacetime strength of about 16,000 officers and men in December 1860 to a maximum size of 1,000,000 by 1865. The Confederate army may have reached a strength of 500,000 men at its height."<
https://www.britannica.com/topic/The-United-States-Army>
At the same time, the British army numbered about 100,000 men.
Following the Civil War, the US drastically reduced its Army. Congress, on July 28, 1866, voted an establishment of 54,302 officers and enlisted men. Actual strength reached about 57,000 on September 30, 1867, a peak until 1898. In 1869 Congress cut the authorized strength to 45,000. In the reorganization of 1876 limited the total authorized force to 27,442, an authorization that remained virtually the same until the Spanish-American War. <
http://www.history.army.mil/books/AMH-V1/ch13.htm>
At the outbreak of WWI in August 1914, Britain had 975,000 men active and in reserve. The US had 200,000 men active and in reserve. After mobilization, Britain had a force of 8,905,000 men, the US 4,355,000 men. <
http://spartacus-educational.com/FWWarmies1914.htm>
Between the World Wars, nations once again reduced forces. But by 1939 the regular British Army had a strength of 227,000 men, supported by 428,000 in the Territorial Army. <
https://ww2-weapons.com/british-and-empire-armies-1939/>
In the US, in June 1920, the Regular Army numbered about 200,000. In January 1921 Congress directed a reduction in enlisted strength to 175,000, and in June 1921 to 150,000, as soon as possible. A year later Congress limited the active Army to 12,000 commissioned officers and 125,000 enlisted men, not including the 7,000 or so in the Philippine Scouts, and Regular Army strength continued at about this level until 1936. <
http://www.history.army.mil/books/AMH/amh-19.htm>
In WWII, the US had total armed forces of 12,364,000, Britain 4,683,000.