The US Supreme Court has allowed the Trump administration to use a national database to verify voter citizenship records.