Most likely this is the same issue as described here Request to /templates slow to load after installing collabora -
Support - Nextcloud community
Issue was raised here: New file creation takes a really long time · Issue #4402 · nextcloud/richdocuments
And fixed here: feat: only get template fields once selected by elzody · Pull Request #52514 · nextcloud/server