Most top STEM departments are very immigrant-heavy (sometimes more than 50%). It can be both true that US universities have top departments, while Americans are disadvantaged at getting in (by having weaker foundations, particularly in math).
A STEM professor once told me he needed a Masters in math before they would let him in. They doubted an American with just an undergrad degree could handle the technical challenge. This was almost 2 decades ago, since then the gap may have widened a bit.