Russia had on the order of 40K towed artillery pieces at the beginning of hostilities. I think they've now lost ~4K guns since hostilities began in Ukraine. It's not the number of tubes available; it's ammo supply logistics that will end Russia's war. HIMARS and Excalibre play a major role in disrupting logistics, as do AFU drone squadrons. This is a new type of war, much like the way the Lilliputians defeated Gulliver. Trick is, what do you do with him once you've got him tied down? Plans to blind and starve the giant may not end well for all involved. Ironic that the little man, Putin, is Gulliver in this retelling.
Your numbers are a bit off. Russia started the war with
Mortars (82mm and 120mm, short range infantry use) - ~5000
Towed guns ~8200
SP Guns ~6200
The infantry mortars are a type of artillery, but they fall into a different category than field guns which are the SP and towed guns. We know that some percentage of the guns in reserve at the start of the war were useless because they had burned out the barrels in the Chechen wars and just stuck them into reserve rather than scrap them or try to repair them. There are satellite imagery from the SP gun parks showing some of the SP guns left there and they look like they have been stripped for parts.
Ukraine claims they have taken out 6565 guns in combat. We don't know how many Russian guns have been taken out of service because the barrel burned out or some other problem. That's losses on top of the 6500 Ukraine claims. The number of guns that are out because of wear and tear could easily be close to the number Ukraine have taken out in combat. Last year many Russian guns got insanely heavy use for a few months and they must have worn out a lot of barrels from that combat.
Russia may have started the war with ~12,000-13000 guns that actually work and they could have lost 10,000 to 11,000. Last month they lost more than 900 guns in one month in combat and this month they are on pace to lose even more than that. Russia may have been able to repair some damaged guns by stripping parts. So they are probably putting some of the lost guns back into service, but with no barrel production they have a bottleneck. Most of their replacement barrels for worn out barrels is probably being scrounged from guns the Ukrainians took out but didn't damage the barrel that badly.
Even if they are able to bring some guns back online, they are still losing them at a huge rate. Their remaining guns is probably down in the 2000-5000 range. I think it's the lower end. And just about all their guns have a fair bit of wear and tear on them at this point. Losing 900 guns a month is unsustainable.
Russia is probably trying to buy guns from North Korea. China may be able to slip them their old towed guns which came from the USSR. China can't really get away with selling their SP guns because all of their SP guns in service are native designs. They use Russian caliber ammunition, but look different from Russian guns. It would be pretty obvious to observers where they came from if China did try to slip some to the Russians.
Russia can be forced into a critical shortage of guns at the current rate of losses.
Ammunition supply is probably not the choke point anymore. They appear to have mostly burned through their Soviet reserve, but with fewer tubes to shoot with, they are pretty much matching production right now.
Reports have been that the Ukrainians are firing more artillery per day than the Russians now. Western artillery is vastly more accurate requiring fewer rounds per fire mission, which means Ukrainian artillery has become much more effective.
Perun's latest video was on battlefield casualties and up until the offensive this summer that #1 casualty cause for Ukrainians was Russian artillery. Mines moved up into the #1 spot during the offensive. But artillery is still a big cause of wounds and death in areas where the front is fairly stable. Eliminating the artillery eliminates one of the worst vectors for casualties. As the Ukrainian offensive gets deeper into the Russian lines, they are also getting past having to fight in areas that are heavily mined so mine casualties will be going down too. There are mined areas that were bypassed, those will have to be dealt with eventually, but for now Ukrainian troops can worry a little less about stepping on a mine at any second.
Taking out Russian artillery is taking away Russia's most effective combat tool and also reduces casualties. A win win for Ukraine.