Apple and oranges. NATO did not fight a proxy war with the Taliban. NATO has not been formed to fight in an asymmetric war in mountains. And NATO countries are located thousands of kilometers away and can't care less about who controls where in Afghanistan as long as they hold regions of economic and political importance. NATO is not there to ensure that Afghanistan will reach peace and stability, they're there to steal Afghanistan's mineral resources and control a country neighboring both Iran and China and they have currently achieved what they want.
If Iran truly decides to fight against the Taliban, which I highly doubt it for apparent reasons, it will be a proxy war where Iran will mobilize and heavily arm Afghan militias against them, particularly in the western regions of Afghanistan close to the border with Iran. Give $200/month to unemployed Afghans and promise them that they will rule over parts of Afghanistan as well as other benefits and you'll have a militia that can fight the Taliban on the ground. Iran could also make deals with ANA against them. And it will be easy for Iran to support them on the ground with money and weapons because we are a neighboring country.
Anyway, I can't care less for the war in Afghanistan. The status quo is not bad for Iran and I don't see why it should change. Chaos in Afghanistan means a new wave of immigration to Iran and our economy can't support more refugees. We are already hosting 4 million refugees in Iran. We can't host more.