So does the data directory actually exist? What are the owner/group settings? Can you show your nextcloud.conf in your apache configuration? I find it strange that the apache complains about a not existing data directory, that should be a nextcloud problem, not an apache problem.
Sigh so the missing data directory that Apache complains about is configured as the Apache logfile. This has nothing to do with nextcloud. Also, the Apache log file should not be in the nextcloud directory.
Obviously you log in as the pi user. So you can use sudo to get root privileges. This allows you to access all files. Be careful: this also allows you to destroy the system. The following commands should be safe.
I would suggest to create a dedicated directory for the apache log files: