You tried to install what version of Nextcloud? Normally, you need to go through NC 12 which still needs a php version < 7.2. They tried to make it possible in the future to skip major upgrades, but I don’t know about the status if you could try to go to NC 13 directly (@nickvergessen).
If you skip a major upgrade (worst case by tricking with the version numbers), or for upgrades in general, please do a full backup of your data, config, and database. In the current state, you haven’t changed your data, you can still go back to the OC X code, or try a different upgrade path in case something goes wrong.