They can, which is why many companies do the bare minimum malicious compliance to claim thet they attempted to hire Americans for these jobs. Things like ads in the local newspaper that 99% of qualified Americans will never see:
https://www.newsweek.com/h1b-job-ads-green-cards-targeted-im...