I can change the PHP version to 8.0.13, and it takes. However, if I exit Wampserver and restart it, the Apache version reverts to 5.7.40. I can then change it again, and everything works.
I must have something wrong in a config file that causes this, but I can't find it.
I figured it out, thanks to the very detailed stickies on the forum. I read all of them carefully (which I should have done earlier) and determined that my install of Wampserver was flawed. I redid it following the instructions carefully, and it all works now.