So generally, when a region of a nation tries to break away and form a new nation or join a nation, it's acceptance as a nation is generally based on the Diplomatic Recognition of other Nations. This can either be de facto or de jure, with the former acting in a manner of having some acknowledgement of a government of a territory, while a de jure recognition typically is stronger with embassies, consulates, and treaties between the two nations. For example, the United States has de jure recognition of France and vice versa, while they merely have de facto recognition with Iran (They recognize there is a government of the territorial area known as Iran, but they feel that the current government is illegitimate and refuse to engage with it in diplomatic relationships. Iran similarly knows there is a United States, but refuses to recognize it for political reasons as well.). When two nations do not have de jure recognition they will often appoint another nation "Protecting Power" who will act as a representative of the appointing nation in the nation they do not recognize. Currently, the Swiss Embassy in Iran has an office dedicated to U.S. affairs as it is the Protecting Power of the United States in Iran. Iran has asked Pakistan to have the same duties. And before you ask, yes, it is the geopolitical equivalent of two people in the same room not speaking to one another, but telling a third person to give the other person a message (U.S.: Switzerland tell Iran that they will give us back our citizens who are being held in their jail cells or we will drop bombs on them. Switzerland: rolls eyes Iran, the U.S. says they want their guys back or they will bomb you. Iran: Oh yeah? Tell U.S. 'Death to America!' Switzerland: eye roll They said... U.S.: Already routing the bombers!)
If a region is claimed by more than one government, than it becomes disputed territory. Presently China has a lot of disputed territory with its neighbors and Maritime neighbors. Ongoing disputes include territories also claimed by India, Bhutan, Japan, Taiwan, Vietnam, Malaysia, and The Philippines. Interestingly, the dispute with Taiwan is over who is the real government of China... Taiwan claims much of the other disputed territory China does... plus some territories which China has resolved disputes over.
The Russia-Ukraine situation will likely leave the territory in question (The Donbas and Crimea Regions) listed as disputed. Generally, disputed territory doesn't mean nations cannot be friendly, as the United States has a number of territorial disputes with Canada, despite being very strong diplomatic allies (with the single largest land boarder between two nations in the world, disputed territory was bound to happen). Perhaps the most interesting is the now resolved dispute of the San Juan Island in Washington State. Oversimplified History has a good video about it on his YouTube channel, specifically the "Pig War" confrontations and does a pretty good job of highlighting just how dramatic the change to the modern border would have been.