In 1820, the young United States had a large territory stretching from the Great Lakes to the Gulf of Mexico and from the Atlantic Ocean to the Rocky Mountains. Over the following century, the country greatly expanded its territory across the continent. Much of this expansion was made possible because of the security offered by being geographically distant from foreign powers. Since 1815, after the end of the War of 1812, no foreign power has made any significant attempt to infringe on the United States' sovereign home territory.
This lack of direct threats on its borders gave the United States great confidence to expand across North America over the course of the nineteenth century. In the 1840s, the United States took advantage of Mexico's vulnerability and added about half of its neighbor's territory to its own. By the end of the century, nearly every American indigenous tribe had been wiped out or forced onto reservations. Without direct competition from other major powers, many white Americans felt that hegemony over the continent was their God-given right, their "Manifest Destiny."
Being the undisputed dominant nation on the continent led to a great deal of insularity for white America. Being free from the threat of invasion meant that the country instead devoted much of its energy during this period to internal matters, many involving the issue of balancing the wishes of free states and slaveholding states. This eventually led to the greatest existential crisis the country has ever known, the Civil War. Remember that the Civil War was a domestic threat, not a foreign one. In spite of the dangers that the Civil War presented, the country did emerge from the conflict intact, something that likely would not have happened if it had had hostile foreign powers at its borders.
By being the biggest and most powerful country on the continent, the United States has always been a confident nation with a sense of exceptionalism. This mindset has allowed the country's leaders to confidently attempt to be a major influence throughout the entire Western Hemisphere. From the Monroe Doctrine to the Spanish-American War, the United States has viewed itself as the top player in the region. It used its position to limit European involvement in the Americas and to influence the affairs of other countries in the hemisphere. Once again, much of this has to do with the country's unique position as the most powerful and best-positioned nation in North America.