MySQL error 1396: CREATE USER or DROP USER failed, and how to clean up

The message doesn't say what's wrong, only which operation and which account:
DROP USER IF EXISTS 'lab_anna'@'localhost', 'lab_anna'@'%';
CREATE USER 'lab_anna'@'localhost' IDENTIFIED BY 'first password';CREATE USER 'lab_anna'@'localhost' IDENTIFIED BY 'second password';ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'lab_anna'@'localhost'In nearly all cases the reason is simple: for CREATE USER the account exists, for DROP USER and ALTER USER it doesn't. What makes it confusing is that an account is a name and a host together, and the part you didn't type is filled in for you.
Look at what is there, both columns:
SELECT user, host, plugin, account_locked FROM mysql.user WHERE user = 'lab_anna';+----------+-----------+-----------------------+----------------+
| user | host | plugin | account_locked |
+----------+-----------+-----------------------+----------------+
| lab_anna | localhost | caching_sha2_password | N |
+----------+-----------+-----------------------+----------------+All runs are on MySQL 8.0.33. MariaDB uses the same number and text.
PHPSolvedThe fix first, then the reason
PHPSettings, errors, types and functions, with the version each answer was run on.
MySQLErrors by number, dumps and restores, duplicates, indexes and slow queries.
phpMyAdminCookies, secrets, storage tables, imports and login screens that will not let you in.
nginx and ApacheServer blocks, PHP-FPM sockets, redirects, certificates and upload limits.
LinuxShell jobs around a web server: permissions, SSH, logs, archives, limits.
LaravelSubdirectories, keys, cookies, versions and deployment details.