You can’t ignore the hardworking American displaced by the skilled immigrant; there is little motivation for Americans to invest in job skills if the jobs are just given to foreigners here anyway (imported to keep salaries down).
You are assuming the number of jobs available is FIXED.
That is not how an economy works. To keep economy thriving, it has to compete with businesses worldwide. The internet has made it very difficult to stop exporting services. Your x-rays are read by some doctor in a foreign country because the hospital saves money by doing that. Internet is free and un-restricted access worldwide. That WWW you see in web address stands for World Wide Web. By importing highly skilled immigrants, the local economy thrives and expands. A stagnant economy can not survive and will shrink continuously.
American born candidates always have the advantage over foreigners because of language skills and familiarity of American culture. Problem is not enough Americans want to do the hard work of studying STEM curriculums. Majority of PhD candidates in STEM are foreign students. Because not enough Americans want to bother studying hard. It is not because universities favor foreign students, it is simply because not enough Americans students are available.
Look at silicon valley, majority of creative businesses there were started by foreign born people. If we had forbidden those people to immigrate, those businesses would never exist and they employ lots of Americans born workers as well.