I’m not sure why Apache vs Nginx or others would make a difference (I don’t think it does), but I like keeping data outside of the web root because it makes upgrades, backups, and restores easier when necessary.
Depending on how far you are into Nextcloud as far as having shared links, etc. you may not want to attempt this, and they technically don’t support changing the location after installation. However, it does seem to be possible if you’re willing to make manual changes to the config file and database (there are some relative paths, but there are some full paths as well which would need to be updated by hand or with update queries).
I did this a while ago but unfortunately I don’t have a step by step guide for it.