Lever guns were not all that popular in the old west. As said reliable guns didn't appear until the last days of the 1800's. In fact bolt action rifles in the far more modern 7X57 beat the 30-30 into production by 2 years.
Most of the legendary exploits of lever guns was just in the Western movies made popular starting in the 1920's. I believe they would have died off after WW-1 had it not been for Hollywood.
But whether based upon fact or fiction the lever action rifle has been the iconic American rifle from about 1920-2000. I'd say the AR rifle is the iconic American rifle of the 21st century.
Actually lever actions were pretty popular -- they had their niche.
They were not popular with hunters, especially those after big game because the early ones couldn't handle the BIG thumpers like the .45-70 and that style of cartridge. If you wanted to hunt buffalo you wanted a Sharp's dropping block or Remington rolling block in one of those big cartridges.
Lever actions were considered by many to be "tyro" guns -- for amateurs. But they also developed a following for self defense use and as a kind of utility rifle ; much like today's AR rifles.
That isn't to say people didn't make good use of many other rifles that were around like flintlocks, flintlocks converted to caplock, and straight out caplocks, and even break action single shots.
In other words, they used what they had, which may have been their daddy's or grandpa's old gun.
And don't forget that lever actions were not sold in JUST the west, they became popular enough in the east and elsewhere, too.
Oliver Winchester was too good of a saleman to ignore any part of America.
The advent of Hollywood and its penchant for westerns probably helped maintain the lever action to a degree. The fact that there were a lot of model 1892 Winchesters around at that time meant that many of early Hollywood movies had them using that model long before they actually arrived. Chuck Connors' iconic series "The Rifleman" was, IIRC, set in post Civil War America but even then Hollywood was still making use of those stores of 1892s, so Chuck wound up with one instead of the 1866 model which may have been more historically accurate, or an 1873, which could also have been believable.
Sometimes one does note better use of historically accurate guns. In the mid 1960s ABC-TV tried to make George Armstrong Custer a TV hero; Wayne Maunder assumed the role and for one year those following the show were treated to Remington Trapdoors and Spencer Carbines as well as the occasional 1873 Winchester in the hands of a civilian or Indian. Firearms accuracy does not make a TV show popular, however, and people didn't take to well to Custer presented as a hero, so the show was shot down after only one year. Wayne Maunder's fictionalized hero didn't even make it to the Little Bighorn.