In theory you can install the next major version and directly upgrade. However, if there is a problem, you won’t know if it is due to the new environment or due to the new NC version.
You need a php version that is supported by the Nextcloud you are planning to use. So php 8 should be ok. Be careful if you use some caching modules in your config and it’s not set up in php 8 yet.
If you control the client, I would just disable them, do all the restoring, check if it is working and then try to turn on one client to see if everything works as expected.