do you have a recent backup?
it looks like you’ve not upgraded for quite some time? (judging by references to Postgres … 13 - the upgrade to Postgres 15 was pushed over 1.5 years ago)
I would strongly recommend you migrate to a new server using your latest backup.
That would avoid a lot of upgrade shenanigins and should be pretty painless.