I don't know why you'd have to pick between surface ships and subs. The totality of the US Navy is what makes it an important sea-going force.
But let's use the other example: RN circa 1812-1815.
I'm going to go with rated ships and cruisers (sloops) for brevity's sake. An appropriate comparison class will be included alongside for what Starfleet's "equivalent" would be.
Royal Navy ship classes roughly circa 1814
Ships of the Line
First Rates
"Modern" First-rate classes
Caledonia-class (120 guns) - Launched 1808 - 1 ship (later includes 3 additional ships after 1820)
Ville de Paris-class (110 guns) - Launched 1795 - 1 ship
Hibernia-class (110 guns) - Launched 1805 - 1 ship
Ocean-class (110 guns) - Launched 1805 -1 ship
Impregnable-class (100 guns) - Launched 1810 - 1 ship (2 additional built to lengthened design)
Additionally captured ships are:
San Josef (110 guns) - Launched 1783 by the Spanish
Total Classes in Service: 5
Average Class Age as of 1814: 8 years
2380s Starfleet equivalents: Vesta, Sovereign and Galaxy-class starships.
Pre-1790 first rates:
Victory-class (100 guns) - Launched 1765 - 1 ship
Royal Sovereign-class (100 guns) - Launched 1785 - 1 ship
Royal George-class (100 guns) - Launched 1790 - 3 ships built, 2 surviving as of 1814.
Total Classes in Service: 3
Average Class Age of 1814: 34 years
Comparable Starfleet design as of 2380s: Ambassador-class.
Second Rates
3-Decker Second Rates (Older first-rates and designs built to similar draughts, but somewhat smaller. Less sea-worthy but "tougher" in a fire-fight)
Barfleur-class (90 guns) - Launched 1768 - 4 ships built, 2 ships surviving as of 1814
Duke-class (98 guns) - Launched 1777 - 4 ships built, 3 ships surviving
Repeat London-class (98 guns) - Launched 1788 (original design 1766) - 4 ships built, 3 surviving
Boyne-class (98 guns) - Launched 1790 - 2 ships built, 1 surviving
Neptune-class (98 guns) - Launched 1797 - 3 ships built
Boyne(II)-class (98 guns — Built to Draught of Victory) - Launched 1810 - 2 ships built
Total Classes in Service: 6
Average Class Age: 35 years (counting the second Boyne class design as being similar in age to Victory)
Comparable Starfleet design as of 2380s: Ambassador-class, possibly Nebula-class
Third Rate Ships of the Line
80-gun ships (Quasi-Second Rates)
Caesar-class (80 guns) - Launched 1793 - 1 ship.
Additional ships of the type include:
Ca Ira
La Tigre
Canopus
Tonnant
Spartiate
Malta
Brave
Alexandre
French ships captured between 1795 - 1806
Total: 9 Ships
2380s Starfleet Equivalent: Akira-class Starship
74-gun Ship of the Line (Mainline ship of the line)
Pre-War Designs
Bellona/Arrogant-class - Launched 1761 - 17 ships built, 9 ships remaining in service (2 as Razee frigates of 58 guns)
Canada-class - Launched 1765 - 4 built, 2 remaining (1 Majestic as a 58 gun razee frigate)
Albion-class - Launched 1763 - 5 built 3 in service.
Ramilles-class - Launched 1763 - 9 built, 1 in service
Royal Oak-class - Launched 1769 - 6 built, 5 in service
Elizabeth-class - Launched 1769 - 8 built, 1 in service
Culloden-class - Launched 1776 - 8 built, 4 in service
Alfred-class - Launched 1778 - 4 built, 4 in service
Ganges-class - Launched 1782 - 6 built, 5 in service (last unit of this class built in 1816)
Carnatic-class - Launched 1790 - 4 built, 2 in service
Total Classes: 11
Average class age: 43 years
Starfleet comparison class: Excelsior-class, possibly New Orleans, Niagra classes as well as unseen classes like Ho'ukula
"War" era 74s
Brunswick-class - Launched 1790 - Ship
Mars-class - Launched 1794 - 2 Ships
Courageux-class - Launched 1800 - 1 Ship
Platangenet-class - Launched 1801 - 1 Ship
Ajax-class - Launched 1798 - 2 Ships
Conqueror-class - Launched 1801 - 1 Ship
Dragon-class - Launched 1798 - 1 Ship
Northumberland-class - Launched 1798 - 2 Ships
Spencer-class - Launched 1800 - 1 Ship
Achille-class - Launched 1798 - 2 Ships
Revenge-class - Launched 1806 - 1 Ship
Milford-class - Launched 1806 - 1 Ship
Fame-class - Launched 1802 - 9 Ships, 8 Remaining
Vengeur-class - Launched 1810 - 26 ships built by 1814, 40 ships built in total through 1822.
Total Classes: 14
Average Class Age: 14 years
Starfleet Comparison: Akira, Nebula, Steamrunner.
Few Fourth Rate ships were in commission during this period. A handful of 50 gun ships. One might liken them to the small number of Constellation-class ships still in service. Useful in limited circumstances to remain in commission.
Frigates
The work horses of the fleet. Many many different types by this period, including "super" frigates which were armed with large armaments of 24-pounders rather than the standard 18-pounder armament.
"Super" Frigates
Endymion-class, Launched 1797 - 6 Ships Built
Acasta-class, Launched 1798 - 1 Ship Built
Cambrian-class, Launched 1797 - 1 Ship Built
Leander-class, Launched 1813 - 1 Ship Built
Newcastle-class, Launched 1813 - 1 Ship Built
Total Classes: 4
Average Age: 10 years
Starfleet Comparable class: Prometheus-class, Defiant-class. (Combat centric, fixed purpose ships)
Fifth Rate 18-pounder Frigates
Flora-class, Launched 1780 - 4 Ships Built
Minerva-class, Launched 1780 - 4 Ships Built
Latona-class, Launched 1781 - 1 Ship Built
Perseverance-class, Launched 1783 (repeat class built in 1800s) - 11 Ships Built, Remaining
Pallas-class, Launched 1794 - 3 Ships Built
Artois-class, Launched 1794 - 9 Ships Built
Alcmene-class, Launched 1794 - 4 Ships Built
Phoebe-class, Launched 1795 - 4 Ships Built
Amazon-class, Launched 1796 - 6 Ships Built
Penelope-class, Launched 1798 - 3 Ships Built
Leda-class, Launched - 47 oak ships plus 8 of fir built from 1805 - 1932
Narcissus-class, Launched 1801 - 3 Ships Built
Amphion-class, Launched 1798 - 5 Ships Built
Lively-class, Launched 1804 - 16 Ships Built
Apollo-class, Launched 1799 - 27 oak Ships Built + 10 from pine
Total Classes: 15
Average Age:
Starfleet Comparison: Intrepid, Luna-class starships.
Fifth Rates below 18-pounders
Examples here are:
Southampton, Richmond, Amazon, Circe and Maidstone classes.
Most were about 30 years old by the 1810s.
Starfleet Comparison: Cheyenne, New Orleans, Springfield, Centaur, Norway-class.
Sixth Rate Frigates/Post Ships (By this point these ships are badly outclassed, as they're still regarded as "frigates" but are usually outgunned by a comparable sloop of the American or French navies)
Example classes of "Jackass" frigates:
Enterprise, Mermaid, Banterer, Laurel, Hermes, Cyrus, Coventry, Lowestaffe
Anywhere from 5-25 in commission during this time.
Average Class Age - 6th Rate Frigates: 30 years, Post Ships: 5-10 years.
Starfleet Comparison: Miranda, did I mention Miranda?
Sloops/Corvettes
Examples here are:
Ship-sloops: Pylades, Cormorant, Bittern, Merlin.
Brig-sloops: Albatross, Cruizer, Cherokee, Crocus
Adding up to some 400 total vessels of something like 15 classes.
Starfleet Comparisons: Nova, Oberth, Sabre, Merian-classes. (The Merians would act as "modern" replacements for Mirandas, similar in capability, but classed as something smaller)
So in total we have something like 95+ classes, and these are not including things like coastal luggers, bomb ships, transports, and the like. Note also the average age.