There is no office that issues statehood. Whether a territory is treated as a state depends on decisions taken separately by every other government, and those decisions are political as well as legal. Practice varies and evolves over time.
The traditional criteria are descriptive
Customary formulations describe a state as having a permanent population, a defined territory, an effective government and the capacity to enter relations with others.
Those criteria are useful as a description, but they do not settle contested cases, since disputed entities frequently satisfy most of them.
The gap between meeting the criteria and being treated as a state is where recognition enters, and it is the practical question in nearly every disputed situation.
Recognition is granted state by state
Each government decides for itself whether to recognise another, and the decision is expressed through formal statements, the establishment of diplomatic relations or the conclusion of treaties.
Because recognition is bilateral, an entity can be recognised by many governments and not by others, and its legal position differs accordingly in each.
Some states follow a policy of recognising governments rather than states, or of avoiding formal recognition altogether, which adds further variation to how the same situation is treated.
Membership of international bodies is a separate question
Admission to an international organisation follows that body's own rules and its members' votes, and it is not the same thing as recognition by any individual state.
Membership nonetheless carries great practical weight, because it confers standing to participate in negotiations and to be treated as a counterparty in routine business.
Entities excluded from membership can still maintain extensive relations through offices that perform diplomatic functions without carrying diplomatic titles.
Practical consequences follow recognition closely
Recognition determines whether passports are accepted, whether courts treat the entity as sovereign, and whether it can hold assets or borrow in its own name.
It also determines access to the institutions that settle payments and register aircraft, shipping and communications allocations, which are prerequisites for ordinary commerce.
An unrecognised territory can function internally while remaining largely excluded from these systems, which is the condition several such places occupy for decades.
Positions change slowly and rarely reverse cleanly
Recognition decisions are made with an eye to precedent, since a government granting recognition in one case invites arguments about comparable cases elsewhere.
Withdrawal of recognition happens but is unusual, and the resulting position is often left deliberately ambiguous rather than stated plainly.
That caution is why the map of recognised states changes far less often than the map of who actually controls what on the ground.