The War of American Independence did not end after Lord Cornwallis surrendered his army at Yorktown. Instead, Yorktown is best understood as the beginning of the end.
The immediate result of the British losing another significant (and previously successful) army in America was the fall of Lord North's pro-war British administration. North made mistakes that contributed to starting the conflict, and he was never able to come up with a strategy for dominating North America. Despite this, King George III had complete faith in North. The defeat of Cornwallis, who had campaigned throughout the entire South without suffering a real defeat on the battlefield (Guilford Courthouse was, at worst, a draw), demonstrated that British military victories were meaningless in the absence of the ability to strengthen the political loyalty of the colonies. If there hadn't been a loyalist rebellion while the British were prevailing in the most allegedly loyalist colonies, there most surely wouldn't be one now that the rebels had taken control of another army. Due to the arrest of Cornwallis, the Crown was forced to raise and send another army to North America despite having little guarantee of success and while being engaged in a global war against the French, Spanish, and Dutch. It was time to file a peace lawsuit. On March 20, 1782, Parliament passed a vote of no confidence in North, which North lost.
Lord Rockingham, a vocal opponent of the war and ally of the most radical members of Parliament, replaced Lord North. Charles Fox, one of the most combative liberals in Parliament, was selected by Lord Rockingham as one of the two Secretaries of State. Fox and Rockingham, to a lesser extent, were detested by the monarch, who toyed with the possibility of abdicating the throne rather than support any cabinet that included Fox. George III finally gave in when Rockingham appointed Earl Shelburne as a second Secretary of State, who was comparably more moderate. Shelburne was extremely clear about the conditions he would only serve in the government if the monarch acknowledged American freedom and put an end to the war. Rockingham lived just long enough to form his government, dying on 1 July 1782.
Since Fox would never be allowed to lead a government, Lord Shelburne took over as prime minister in lieu of Rockingham. Fox finally established an unexpected coalition against Shelburne with none other than his bitter political rival, Lord North, after resigning in disgust. The Shelburne ministry only survived long enough to broker a peace treaty with the United States and its allies and save Britain from the geopolitical and military impasse that North had led it into. At the Paris peace negotiations, Shelburne's agents gave the Americans such benevolent conditions that they broke off and signed a separate peace, forcing France and Spain to sign a deal before they were genuinely prepared to do so (more on that later). From the Atlantic to the Mississippi, and from the St. Lawrence/Great Lakes to the Floridas, would be the boundaries of the United States (returned to Spain from British control; Britain had received East and West Florida from Spain at the end of the Seven Years War in exchange for Britain returning Havana, Cuba to Spain after the British captured the sugar port late in the war). Between the fall of Cornwallis in October 1781 and the appointment of William Pitt the Younger as Prime Minister in December 1783, there were five prime ministers in Great Britain, and there were at least two occasions when the monarch seriously contemplated (or threatened) resignation.
Given the current state of politics, Britain was naturally hesitant to launch a significant attack in North America. The greatest surviving British army in America was under Sir Guy Carleton's command in New York City, where there were around 10,000 troops. After Yorktown, Washington combined the massive garrison force he had left in the Hudson Valley with the men he had sent to Yorktown, increasing his total force to around 10,000. Military leaders abhor a fair war, so while they waited for their governments to ratify a peace treaty, the two armies established themselves in their separate bases and occasionally engaged in skirmishes. * In late February 1783, word that the parties at Paris had signed a peace treaty began to spread to North America. Congress then ratified the conditions that their delegates had agreed to in early April.
In summation, the years after Yorktown were both politically and militarily important to the American Revolution, and saw several moments when events could have taken a radically different turn. The failure of the British military to find a way to win in North America and political uncertainty were the two biggest reasons why the British did not commit to another offensive against the United States even as the nascent republic struggled to find its footing and its allies lost ground to British arms around the world.