I just had to deal with this myself.
I rolled back a version from the drop down (roll back) - scroll to the bottom to find your latest previous version. The advice from @DjP-iX pointed me in this direction. I think it was 1.13.4 (app version) for me.
Once I verified Immich works okay on the older version - upgraded postgress to 18 (many notes in the post and also the depreciation notice in the edit section)

Once Immich started - applied the upgrade - it completed okay.
Hope this helps somebody.
