The justices ruled a citizenship law was based on stereotypes that violated equal protection principles. In another case, involving debt collection, Justice Neil M. Gorsuch issued his first opinion.