Easiest way I think is : https://ubuntu.com/appliance/nextcloud/raspberry-pi or https://github.com/nextcloud/nextcloudpi/releases
Note: In my case (Overclocked Raspberry Pi4B + SSD), I manually installed Nextcloud using docker (https://hub.docker.com/_/nextcloud/) and used for a year.
As others have pointed out (and so is my experience), the performance will be okayish; the main issue you will encounter is thumbnail generation being quite slow (even with overclocked Raspberry Pi).
Couple of suggestions: Try to keep the installation slim, avoid too many addons/ extra packages.
Also, make sure your Raspberry Pi is connected to LAN and not via Wireless. As that will help with at least improving network throughput.
I recently migrated to old laptop based homelab setup and installed Nextcloud AIO, and the throughput is significantly higher as it should be over LAN.