> The closest I can think of in the US is Trump banning immigration from majority-Muslim countries under the pretext of links to terror.
The Trump travel ban is weird in its various iterations. On one hand Trump was on the record during his campaign as wanting to ban Muslims from entering the country entirely, but on the other hand the ban completely omitted the largest predominantly-Muslim countries (Indonesia, Pakistan, Bangladesh). For a sense of scale, those three countries make up about a third of the world's Muslim population. (Add on India and Nigeria and you're looking at half of the global Muslim population.) There was also criticism for omitting places like Saudi Arabia, UAE, and Lebanon (and Egypt, in earlier iterations) which actually had demonstrable ties to 9/11.
But, the original list was mostly consistent with restrictions on the visa waiver program, which is to say the administration probably wanted to start small with the most legally defensible subset before expanding it more broadly. In practice, said restrictions were uniformly blocked by the judicial system.
Ostensibly the first amendment's establishment cause prevents Congress from passing laws that are overly religious, although that doesn't entirely stop them from, say, passing the Defense of Marriage Act or attempting to explicitly opt out churches from COVID restrictions.
These days it's mostly about putting ideologically-aligned judges on the courts and letting them choose which laws to block or precedent to overturn.