By definition the word annexation is to add to one’s own territory by appropriation. Under international law, it is a unilateral act by one State as to territory of another State, which is why it is unlawful. According to The Handbook of Humanitarian Law in Armed Conflicts:
The international law of belligerent occupation must therefore be understood as meaning that the occupying power is not sovereign, but exercises provisional and temporary control over foreign territory. The legal situation of the territory can be altered only through a peace treaty or deballatio. International law does not permit annexation of territory of another State.
What is lawful under international law is cession whereby the ceding State transfers its territory to the acquiring State by a treaty. According to Professor Oppenheim:
Cession of State territory is the transfer of sovereignty over State territory by the owner-State to another State and the only form in which a cession can be effected is an agreement embodied in a treaty between the ceding and the acquiring State.
American examples of ceded lands are the 1807 Louisiana Purchase where France ceded its territory west of the Mississippi river to the United States and 1848 Treaty of Guadalupe-Hidalgo where Mexico transferred its territory north of the Rio Grande river to the United States as part of a peace treaty.
The latest example of an unlawful annexation is when Russia annexed Crimea after its invasion in 2014. Ukraine, which Crimea is a part of its territory, did not cede its territory to Russia by a treaty. Under international law, the annexation of Crimea is unlawful. There is no reason to say unlawful about the Russian annexation because it is inherently unlawful under international law.