Trump has long campaigned against illegal immigration, but his second term has been defined in equal measure by his efforts to curb legal migration.