The accepted answer didn't seem to work for me at first, but then later it did. Here are some other things I did, in case anyone else encounters the same issue. I'll start with what I think were more likely the case.
I tend not to delete things. I renamed the Keychains directory to Keychains.bak. Maybe the system was still able to find this directory.
I went to Keychain Access > Preferences > Reset My Default Keychains. It was a little wonky, like not letting me change the password to the login keychain (despite its instructions to do so), but after this step and following the accepted solution (deleting the Keychains directory), things worked for me.
Before any of that I tried updating each of the keychain passwords in Keychain Access. I was surprised to find that the current password on the Local Items keychain was a password from a very old system that was on High Sierra. I had just restored a Mojave backup onto a Catalina system, but from the same drive that had a backup of that High Sierra system, so maybe some keychains got carried over that way.
I had csrutil disable
'ed in recovery mode to allow CDock to make changes to the system and forgot to enable it until later.
Again, I don't think the latter ones were relevant, but posting everything just in case.