These are the recommended packages from the nextcloud docs. Of course it depends on your sepcific installation what packages you have installed exactly. Do you have notes how you installed your Nextcloud the first time?
Important: Do not use “apt purge”! Because that deletes also the configuartion files. If you use apt remove php* only the packages will be removed and any changes in the configuration do not have to be made again after the downgrade, because the old configuration files will still be there.
…and one more thing: If you do not have any notes, here a little hint that may help:
dpkg --get-selections | grep php will show you all PHP-Packages that are installed on your system. Copy the output of this to a texteditor before you uninstall everything
On Arch you can install older PHP versions from the AUR. PHP - ArchWiki
Beside of that a rolling release distro like Arch is maybe not the best choice to run server applications like nextcloud. At least if you don’t want to deal with regular changes to your system and their effects on the installed applications.
Minor releases should not have such major changes that risk to break certain thing. In case of problems many people would complain about that. If you care about php8, you can join the developers and testers and alert everybody and test much earlier, so when NC 20 was still in development.
For anyone with the same problem – in most cases, you will still have php7.4 on your machines, even if php8 gets installed (e.g. through sury). You do not need to uninstall php8, you can just specify that Nextcloud should use php7.4.