"Terrorism" by foreigners in the US is incredibly rare. Mass shootings are roughly weekly. https://www.abc15.com/news/data/mass-shootings-in-the-us-whe...
The deaths from terrorism work out to around 200 per year. Which is on the same order and possibly greater than the mass shooting deaths. And that doesn't even take into account the massive amounts of money and effort we spend on keeping that number low.