Nextcloud's offical docs state that it should be possible to sync iphone calendar/contacts using the base hostname via caldav/carddav.
In my experience, this has not been possible. Instead you must use this URL:
https://<fqdn-of-server>/remote.php/dav/principals/users/<username>/
Deails of be debugging this can be found here: https://help.nextcloud.com/t/ios-caldav-client-not-syncing/155018/2