A US district judge ruled that Trump's decision singled out states that voted for Democrats in the 2024 elections.