For dress-up, the Army and Marines wore the kepi for a few more years, but for field service, brimmed hats were more popular.
After the French lost the Franco-Prussian war, the military prestige they’d enjoyed since Napoleon degraded. By the 1880’s the US army swapped their French kepis for Germainc spiked helmets with horsehair plumes (dyed yellow for cavlary, red for artillery, light blue for infantry) for the dress uniform. They looked great, but were impractical and soon replaced by simpler baracks cover-style caps, with service-color cords.
For field use, the cavalry wore dark blue slouch hats, until the Spanish-American War, when they and the infanty wore the M1898 hat: khaki felt with 3 vent holes. It had the same for-and-aft crease in the crown as the old Wild West hat, but that crease held water now that the army was serving in the rainy Phillipines.
So the army switched to the “Montana peak” style campaign hat still worn by drill sergeants/instructors. They still had service-colored cords, with “acorns” on the ends. For Marines, only officers hats had acorns. These hats were made out of felt: matted animal hair; until the sudden need for millions of them in WWI required use of less expensive wool. At regular visits to the milliner they were sprayed with sugar water and re-blocked with the brims ironed flat, although the Marines liked to affect a pugnatious upward curl in front. (OK, one photo link I can’t resist).
But the “Smokey the Bear” campaign hats were trouble to stow and maintian when at the front in 1918, where soldiers now had helmets for the first time, so the US again took the French example and switched to their flat cap, which could be folded and stowed. We called the flat caps “overseas” caps for this reason. The folding flat cap now had edging on it’s seams the color of the service branches.
Those millions of campaign hats were dumped on the civillian market for recycling, often by kids who’d cut off the brims, cut the base of the crown into points and fold them up into “Jughead” beanies.
So after WWI we had land and air forces set with barracks coves and flat caps, until JFK formed the Green Berets witht the same hats as those dashing European paras (you have to wonder if that was the influence of Jackie Kennedy), and forty years later the whole army had to have them, too.