Sure, we did stop them in . . . . 1914, I think it was, Black Jack Pershing. But that took American troops and an invasion of Mexico. It would take American troops and shooting invaders and probably at least a short-range invasion now.
I have been saying for YEARS that Mexico is the obvious and only jump-off place for an invasion of the U.S. (The two Red Dawn movies say the same, of course.) The Zimmerman Telegram offering German assistance to Mexico in 1917 for their help in tying us up there and keeping us out of WWI STARTED our entry into WWI: within a week we had declared war on Germany. Germany had offered to help Mexico recover the whole entire Southwest. This went over poorly: it was basically a 9/11 event in terms of public sentiment.
So now we have continual invasion of the U.S. day in and out, hundreds of thousands, millions, like the Gauls moving into the Roman Empire until it FELL, thud. We're following Rome: ignoring the invaders till they destroy us.
Yes, we COULD defend our borders, but can you imagine Biden doing anything but stand down there with a big Welcome Invaders sign??