When listening to Dan Carlin's Hardcore History podcast (Wrath of Khans I), he states that no sedentary population really had a good way of dealing with confederacies of nomadic hordes (like the Mongols, Huns, Xiongnu, etc.) until the invention of guns. How would a, say, 17th century military deal with a nomadic invasion?
They would shoot them.
The 17th century was perhaps a little early for the firearm to be able to confidently dominate the horse archer in battle, but already gunpowder made the defense of strongholds fairly secure against steppe warriors.
By the next century, increasingly effective firearms meant that the composite bow was no longer the dominant weapon.
Steppe (or plains - in North America) warriors could acquire firearms, but neither the guns, nor their ammunition could be readily manufactured on the steppes. The nomads were at a disadvantage. Both in Eurasia and North America, the horse nomads would be pushed back and overcome by denser and more urban or settled populations armed with muskets.
The basic process was: first, create forts which could be defended by firearms and cannon and which the nomads could not easily capture. Then, use firearm equipped settlers, cavalry, and infantry, to defend and then retaliate against nomadic raids, hem the nomads in, deny them space and grazing lands, and eventually eliminate them as a threat.