On September 9, 1776, the Continental Congress passed a short resolution: in all commissions and other official instruments where the words "United Colonies" had been used, the style was to be altered for the future to "United States". It was a clerical instruction with a constitutional weight to it.
Independence had been declared on July 4 and the wording of that document already used the phrase "United States of America", so the September resolution was tidying up rather than inventing. But the delegates had been arguing since May over what they were and what they had created, and the language of commissions, passes and letters of marque was where the argument showed up in practice. The vote settled it: a union of states, each with its own government, acting together, was not a single nation-state of the kind the word "colonies" had kept alive.
The same summer they were writing a constitution that said the opposite. Articles of Confederation were being drafted through the spring and summer of 1776 and were not agreed until November 1777, and they described a firm league of friendship among states that retained every power not expressly given to the Congress. It lasted until 1789. It had to be replaced, because it did not work. Congress could not tax. It could not regulate trade. It could not make the states pay for the war it had just fought.
The full form of the name had been in circulation before either document. It appears in a letter written by an anonymous contributor to the Virginia Gazette in April 1776, and Thomas Paine used "United States of America" in print. Whatever its exact origin, by the autumn of 1776 it was the only name on the commissions Congress was issuing to privateers and army officers, and the country has been called that since.