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