You know nothing about the Caucasus. Your timeline is wrong:
The second Karabakh war happened only because of the 2018 coup in Armenia which gave control of Armenia to a pro-Western government. Without Russian support there was nothing Armenia could do to stop Azerbaijan taking back the land that was stolen in the first Karabakh war.
Azerbaijan has more than 3 times the number people Armenia has. In addition Azeris have oil/gas and a strong ally in Turkey. Armenia’s hopelss militaty situation is a given. They can’t win any fight. The only thing they have going is Russia’s support. Without Russian support Armenia is in a very bad spot.
In fact the only reason the 2020 war happened is that Azeris correctly predicted that Russian support for Armenia is not what it used to be, given Pashinyan’s desire to flirt with the West.
Is that why India has the best programmers?