Answer:
Nativism denotes political movements and attitudes in the 1800s that were characterized by a particularly sharp rejection and fight against new immigration, and protection of native inhabitantes, that is, of the white majority that made up the American society of the time. The main distinction was between people who were born in, and / or considered to be culturally belonging to America, and newcomers or their successors, especially if they were also perceived as culturally foreigners.
In this context, the Mexican-American War was unleashed by the intention of the United States to protect the American colonists living in the Republic of Texas, who wanted to join the United States as one more state. Thus, by protecting the "natives" from foreign interests, in this case Mexico, the conflict was unleashed.