Stuck in an update loop after PostgreSQL 13 update

It might have been good to have mentioned that in your first post.

I would do a clean installation and restore your most recent backup. That’s the easiest way forward. Your OS is likely out of date as well.