I've answered similar questuons previously with respect to WW1, but the reasons generally were lingering issues that had their roots decades in the past. In general, the lack of adoption of a lever-action rifle as a standard-issue infantry weapon is the result of several different issues, both doctrinal and technological, coming together.
When lever-action rifles first made their debut around the time of the American Civil War, their biggest strength also became a chief reason that armies of the time didn't adopt them en masse. Supply was a major concern for armies of the time (and would remain so really right up until the major shock to the system that was WW1), particularly the Union and Confederate Armies in America that were fighting over fairly large distances. Ammunition supply was a liability even with muzzle-loading black-powder rifles, where many of the components could be relatively easily procured in the field, and the increased rate of fire of a lever-action rifle was seen as only capable of exacerbating this issue. Even ignoring issues of ammunition procurement (requiring significantly more complicated processes to produce than the muzzle-loader ammunition of the time), there was a very real fear that poorly disciplined soldiers would fire faster than necessary in a panic and waste enough ammunition so as to hamstring the army as the campaign went on. These fears were present in many armies, though they were particularly prevalent in armies that expected to be fighting in far-flung areas, such as the post-Civil War Union Army and the British Army. The Union Army even went as far as to replace the repeating Spencer Carbines used by some cavalry units during the Civil War with single-shot Trapdoor Springfield carbines once they became available. In general, this fear of supply issues from poor discipline continued into the 20th Century - armies were reluctant to consider anything that wasn't a single-shot breechloader for some time, and even when magazine rifles caught on in the 1880s, many powers, including France (1886 Lebel), Britain (Lee-Metford and Lee-Enfield), and the US (Krag-Jorgensen and Springfield Model 1903) included magazine cutoffs in their guns, which would force the shooter to fire single-shot until the cutoff was disengaged per the commands of an officer. Given that the primary appeal of a lever-action in these early years was its magazine capacity, this alone was enough to kill procurement proposals for several decades.
The design of the guns themselves posed a problem for adoption as well. Fairly consistently through the 1800s, lever-action guns available fired significantly weaker cartridges than those used by standard service rifles. The Henry Rifle that saw limited use during the Civil War fired an anemic round that's more of a pistol round by modern standards, and fell well short of the several hundred yard range of contemporary service rifles. When armies all over the world moved to black-powder cartridges like the US .45-70, lever-action rifles continued to lag behind. While Winchester models like the famous 1876 were capable of chambering fairly potent cartridges, it wouldn't be until 1886 that Winchester had a design that was capable of chambering .45-70 - at which point smokeless powder had made its debut and made all existing black-powder cartridges obsolete.
The action was one weak point that needed solving, but the magazine posed another. Tube magazines present numerous problems for service rifles. The balance and barrel harmonics change as the magazine is emptied, impacting practical and mechanical accuracy. No speed-loading mechanism exists for tube magazines, which put them far behind vertical box magazines once stripper/charger clips and en-bloc clips were developed. Perhaps most critically, they presented the danger of chain detonation, as cartridges were placed with bullets resting on the primer ahead of them. While chain detonations wouldn't be a problem with any remotely reliable ammunition and are mostly a non-issue today, they were a major concern during acceptance trials for many nations. Several countries would drop tube magazine designs from consideration following chain detonations during trials, and ultimately only France would adopt a tube-magazine rifle as a general service rifle (1886 Lebel).
Eventually, by the 1890s, two designs would come along that would address the technological issues of lever-action rifles - the Winchester 1895 and Savage 1895. Both had non-tube magazines and could fire contemporary service cartridges. Unfortunately, by the time they were available, bolt action rifles had become the standard and had been adopted by pretty much everyone. The Winchester 1895 did stand out due to its adoption by the Russians as a stopgap during WW1 due to massive rifle shortages, and in that role it performed admirably. They were supposedly well liked, and Winchester adopted the design to have military sights, a handguard, bayonet, and stripper clip guides for use with standard Russian 7.62x54r. Unfortunately for Winchester, the guns were more expensive than the Mosin-Nagants being produced by other American manufacturers, and in strategic terms, the guns offered nothing over the existing Mosin Nagant while being a liability due to lack of parts commonality.
u/Meesus provides a Good answer regarding the American case here
and again provides another answer in the context of WW1 but goes over a few different countries
To my knowledge the only instances of standard issue of lever action rifles for the army of the United States are the Civil War and Spanish-American War.
During the Civil War the Union adopted the Spencer repeating rifle (lever action) in 1863. Which after the war was replaced by the Trapdoor Springfield (Springfield 1873 model).
During the Spanish-American war the army was phasing out precious arms in favor of the Winchester 1895.