Hi
Did you add the external & internal URL of your OO server in the nextcloud config file as « trusted server » ?
It could help, see here : Nextcloud & Onlyoffice via Docker - can't connect on the same server
Also, try to check the checkbox under the first IP adress field on the OO setting page in Nextcloud