By took if you mean defended it from British Conquest in 1814 then yes, the US defended its borders after an ill fated adventure in trying to and failing to conquer a bunch of fur traders and their land.
In fact the United States acquired ZERO territory as a result of the war. In fact the only thing the US got out of it was an end to British impressment of US sailors (arguably that ended due to the end of the war with Napoleon as impressment was not mentioned in the treaty) and the other thing they got was a new paint job on the white house.
It did have the effect of unifying the territory against the US.
I wonder if the US never invaded what was to become Canada……if eventually all of North America would become US states…
Many of the battles occurred right around where I live now but few soldiers from the US actually came from the border areas whereas Kentucky seems to have sent many soldiers…about as foreign to people in Buffalo or Fort Erie, Canada.
In any event, things worked out in the long run, we’re all friends mostly and tis the season so… Merry Christmas everyone and Happy New Year!!!