Polls have closed in thousands of council elections, as well as mayoral votes, and a key by-election test for Sir Keir Starmer.