The most unlikely thing happened right after the revolutionary war. Each of the thirteen colonies, only we can call them states now, had all the things they needed to be independent countries. They had armies, navies, courts, governors, legislatures, universities, newspapers, churches, and establishments who ran the place. The armies and navies all had combat experience gained from winning the revolution. Each state could have stayed independent. The establishment of each state liked that idea; it meant their position in society would be retained.
The only fly in that ointment was Great Britain. It was obvious to everyone that the British would like to reverse the revolution and return the American states back to being colonies, with the crown running each one of them. And it was clear that no one American state could hold off the redcoats, we only won the revolution when every one banded together. “We must all hang together, or assuredly we shall all hang separately.” said Franklin. Most Americans thought Franklin had that right.
And so, the thirteen states agreed to the Constitution. In doing so each of the thirteen states gave up a lot of sovereignty to the new federal government. States could no longer have their own armies and navies. They could no longer establish diplomatic relations with European countries. They gave up the right to levy tariffs against each other. They gave up control of the vast western lands to the feds. And the establishment in each state feared that the federal government would replace them.
But a small miracle occurred. They created an amazing new government, the first democracy in the world, and the Constitution they created is still in use today 230 years later.