These were local elections Tom. The PM was voted in at the last General Election. No matter how many people think it was, yesterday was not a vote on the Westminster government (except in Westminster, where the Tories narrowly beat Labour, the rest nowhere; not a result likely to be reflected in the rest of the country).
The government is deeply unpopular. Any government would be, given the number of grievances people have, and the damage done to our country by the 2008 banking crisis, Brexit, and Covid. Replace the man at ye top, and whoever replaces him quickly becomes unpopular. Meanwhile, for all his faults, Starmer soldiers on; that, at least, is to his considerable credit.