That would be illegal under international law and Baku would then be the aggressor.
https://en.wikipedia.org/wiki/Use_of_force_in_international_law
A state can only resort to military means against another if:
* In a situation of self-defence i.e. if subjected to an armed attack.
* Part of collective action authorized by the UN Security Council.
In addition to the above, some have argued in favor of a legal casus belli for interventionary pre-emptive force if military attack by an adversary appears imminent, others added protection of nationals to the list and others yet humanitarian intervention, more recently. These are all controversial and not backed by consensus of jurists or governments.
Baku invading Zangezur under the pretext that Armenia did not keep its end of the 2020 ceasefire agreement, would not fall under any of the aforementioned categories. Therefore there's no legal basis for such a move. There are legal and political avenues at Baku's disposal to protest purported Armenian violations of the accord. Military means let alone occupation of Armenian land however are illicit.