Upgrade php 7.4 to 8.0 on Ubuntu

If you start a new topic, you have a small template where can go through a list just to not forget about some details. Problem that you posted under an old topic that was partly related (yes it was Ubuntu but not the vm version).
Since you are not the only one with the vm:

and there is a documentation:
https://docs.hanssonit.se/s/W6fMouPiqQz3_Mog/virtual-machines-vm/d/W7Du9uPiqQz3_Mr1/nextcloud-vm-machine-configuration?currentPageId=W7D3quPiqQz3_MsE

For your comfort, they already wrote some small scripts for such procedures that ernolf was giving you manually. Under the hood, there is still a Ubuntu system. From this post:

I suppose that their support does the upgrade of php manually as you did as well.