The Embargo Act (1807) passed by Congress forbade US merchants from trading with either France or England, who were fighting each other during the Napoleonic Wars. The War of 1812 should be seen as the North American extension of those European conflicts. New England manufacturing and shipping had been happily (and profitably) supplying both sides of the conflict, and the US merchant fleet was beginning to compete with the British. Both major powers were not happy with the young United States. To appease them, congress shut down trade and shipping, destroying the New England economy and causing a country-wide depression and a secessionist movement in the North!
After the war, England was not longer a threat to any part of North America, US trade rebuilt and competed with them, and with no serious European contenders left, the US began to assert itself as the "protector" of the Western Hemisphere through the Monroe Doctrine. Removing the European imperial threats, and the expansion of trade and political power led to the Era of Good Feelings.