I assume there is no general cause for such issues. Depending on your setup my first guess would be rebind protection (explained well accessing-nextcloud-externally-internally-through-domain) or ipv6 issues check host-unavailable-only-when-phone-in-wifi and nextcloud-at-home-with-ipv4-and-ipv6 - unfortunately in German. Both problems are not really related to Nextcloud and the solution is different depending on you local devices.
Please post more details if this references don’t help. If this helps feedback is appreciated as well.