A newly minted phrase does not become an idiom when it is first used. At that point is is merely a metaphor, or perhaps, some other figure of speech. If it is used with some frequency and acquires a fixed meaning different from the literal meanings of the individual words, it may become an idiom. If it drops out of use again, it may become "old-fashioned" and later "obsolete".
My question is then who determines whether a word is none standard or not, and how does a word passes from one phase to another in its lifetime.
No one person or group of people make such decisions, rather, the whole community of speakers, and particularly of fluent speakers do.
At one point it might have been said that the writers of dictionaries and grammars made these decisions. But most dictionaries now aim to record current usage, not to fix or prescribe what is correct.
Some idioms live on for a very long time, hundreds of years or longer. Some become distorted and the original meaning, the original metaphor, becomes forgotten by most fluent speakers. (So do some words) Others become unused and eventually forgotten in a relatively short time.
I would define an idiom as a phrase with a widely understood meaning which is not derivable from the individual meanings of the words. It is most often a frozen metaphor, although the metaphor may be forgotten while the idiom remains in active use.
Merriam-webster gives as sense 1 of "idiom":
an expression in the usage of a language that is peculiar to itself either in having a meaning that cannot be derived from the conjoined meanings of its elements (such as up in the air for "undecided") or in its grammatically atypical use of words (such as give way)
Once the meaning of an idiom, as an idiom, is no longer widely understood, it is no longer an idiom. It might be called a "former idiom" or an "obsolete idiom". An obsolete idiom will usually be seen only in historical contexts, and used only in historical novels, or in an attempt to recreate the speech of a time when the idiom was live, or to recall such a time.
The Merriam-webster dictionary entry linked above goes on to say:
If you had never heard someone say "We're on the same page," would you have understood that they weren't talking about a book? And the first time someone said he'd "ride shotgun", did you wonder where the gun was? A modern English-speaker knows thousands of idioms, and uses many every day. Idioms can be completely ordinary ("first off", "the other day", "make a point of", "What's up?") or more colorful ("asleep at the wheel", "bite the bullet", "knuckle sandwich"). A particular type of idiom, called a phrasal verb, consists of a verb followed by an adverb or preposition (or sometimes both); in make over, make out, and make up, for instance, notice how the meanings have nothing to do with the usual meanings of over, out, and up.
The status of an idiom as new, active, old-fashioned, or obsolete, is separate from its status as formal or informal. Most idioms are neither particularly formal nor informal. They can be used in all registers of speech or writing. Some are clearly informal. A few are strictly formal, particularly those used only in formal settings. For example "To powder her nose" is an idiom meaning "to use the restroom". It is now used almost exclusively in formal settings, I believe. It is also becoming old-fashioned, and may soon become obsolete.