This is a false a equivalence. Immigrants do not not use private resources that belong personally to citizens. They consume public resources, paid for by taxes. So long as they also pay taxes, they are entitled to the use of those resources.
In any case, in many of these countries ( including the US) where people are rabidly advocating for curbs on movement, the majority of the population brutally displaced people who had lived there for thousands of years. By your own logic they have been breaking the law for a long time.
That’s kind of the definition of a country.