If country A were to be absorbed into country B, do elected officials in country A generally receive some position in country B? For instance, if Moldova and Romania unite, will Maia Sandu and her cabinet be offered jobs in the Romanian national/regional government(s)?
As the comments said, there is no general answer.
The case I am most familiar with is German reunification. There, the unification treaty specified in article 42 that the East German parliament would elect 144 representatives into the existing West German parliament. That was not relevant for very long; unification happened in early October and about two months later, in early December, a regular election was held anyway.
As for the executive branch, five former East German officeholders became "ministers for special affairs" in reunified Germany. That doesn't seem to have been the result of any kind of agreement; in Germany, the Federal Chancellor is free to appoint any eligible citizen as a minister for anything at all.
To look at historical examples, one of the more famous examples of this occurred in 1706 Treaty of Union, which United the countries of England and Scotland under a singular parliament leading to the formation of the new Nation of Great Britain, which was the successor state to both of the involved nations. In this case, the cause for this was do to the monarchy system of the two countries and the 1603 death of Queen Elizabeth I of England, which ended the Tudor dynasty of died childless and the last of her line. Succession fell to her cousin, King James VI of Scotland (now known as James VI and I). As King of two nations, James and his successors advocated for a single parliament for the two nations, which had to over come several hurdles and was defeated multiple times prior to the Treaty of Union.
The text of this document handles the full merging of the two nations.
Another common solution to the issue is the formation of a Federation government when two or more sovereign nations wish to unite. In a Federation, the "state" governments will vote to join the larger federal union by surrendering certain powers to the federal government while retaining a degree of sovereignty to make their own laws (what governing powers are surrendered generally depend on what the Federal Nation states they have the right to do. Typically, Federal Nations will always control the foreign negotiation for all states collectively, but beyond that it's based on laws of a specific nation.). The United States is one of the most famous Federal Nations and it's laws on what the Federal Government and State government can do are derived from the Constitution, with Articles I and IV as well as amendments IX X and XIV being the most relevant. Other Federal Nations include Mexico, Canada, Australia, Germany, Switzerland (Formally a Confederacy, which is an artifact title from when Confederacy described a federation. The Modern Definition describes something else), Brazil, Russia, India, Pakistan are among some of the most prominent of the 27 nations classified as a Federation. Some interesting Federations design is that of Bosnia and Herzegovina, which is the world's only double Federation (Formed by the union of the Federation of Bosnia and Herzegovina which contained 10 Cantons and the Republika Srpska which is a unitary state. If it helps, Republika Srpska is not part of the "Federation of Bosnia and Herzegovina" but is part of the nation of "Bosnia and Herzegovina" as is the "Federation of Bosnia and Herzegovina".) and The Federation of Malaysia is the world's only Federal Monarchy (While Canada and Australia are Constitutional Monarchies, each Province and State respectively have the same Monarch, the King of the United Kingdom. Malasia's member states each have their own separate royal family). Other common features of Federations are that their national capital cities are frequently planned cities for the sole purpose of being a Capital City and are often part of a Special Administrative District, so the Capital City has no disproportionate ties to any one member-state, though this is not universal. Washington D.C. (U.S.), Canberra (Australia), and Brasília, (Brazil) are examples of this trend.
As briefly discussed, Confederacies are looser for of a Federation, in this case, the member states have to ratify the centralized governments laws before the national law can take effect in that member state... in addition to making their own laws. If this seems insanely frustrating, most of the world agrees and true confederacies have a nasty habit of falling apart quickly as dissenting member state governments. Again, the rules are not universal, but the general difference between confederacies and federations is that confederacies typically will have a way for the member-state to leave the union (to the degree that it's codified law) while federations do not (generally it's uncodified if it exists at all. In the case of the United States, there was a civil war over the matter.). This has the nasty habit of seeing Confederacies be wildly ineffective at running a nation (See the United States under the Articles of Confederation. The Constitution was written primarily to fix everything that was broken with the Articles. In the case of the Confederate States of America, several member states were considering seceding from the CSA as it was becoming increasingly clear that the CSA would not win the U.S. Civil war.). Most confederacies that are stable tend to take the form of regional diplomatic organizations (The European Union) though they mostly get called Confederacies by their critics or as an ad hoc union of member-states that are looking to form closer ties that will devolve into a federation (Again, post-independence U.S. prior to the Constitution.).