For other people who can’t wait for Nextcloud to make the user profile exposure settings configurable, I think this should work:
# Nextcloud disable profile page
RewriteRule ^(.*)index.php/u/(.*)$ https://domain.tld/index.php [R=301,L,NC]
Is someone has a better suggestion to go about this, let me know
.