Texas fought Mexico for independence in 1836
We (USA) fought Mexico in 1846-1848 after we annexed Texas. We gained much more land after that. Then We BOUGHT land from Mexico Gadsden purchase. To straighten out border lines etc.
I believe the annexation is where the US almost tripled in land mass...all the way north to parts of what is now Colorado. I believe we picked up the land between the Nueces River and the Rio Grane when the US fought Mexico. I may be wrong and I’m too lazy to look it up.