Please see this post for more info as has been encountered before and lists steps you can use to upgrade:
going from 12.0.0 you will need to ensure you don’t go straight to 13.x otherwise you will have major problems. The link in the output you provided will help also. My link will help you with the commands required to install/upgrade to specific versions before you go to 13.x. You cannot go to 13.x until you are on 12.10.x because of the postgresql upgrade and postgres version required.