It’s easy but time-consuming.
I did what @devnull suggested:
You can install Nextcloud 28 on the new server. Use e.g. the same user name.
Then you can copy the data form the old Nextcloud to your client and then to the new Nextcloud (use e.g. Nextcloud Client on Windows). With a lot of data, this can take some time.
One thing to watch out for: my cPanel instance does not support MySQL 8 (and I think this is quite common).
See:
https://help.nextcloud.com/t/nextcloud-upgrade-to-27-fails-with-error-mysql-version/171158/4
https://docs.cpanel.net/release-notes/110-release-notes/
I am guessing that this means Nextcloud will eventually stop working…?