I have such a problem.
Installation on a virtual machine.
nginx/php8
!!THERE IS NO SSL!! Because this server is behind the proxy manager.
Resetting the password did not solve the problem.
There is a solution:
In the configuration file nextcloud.conf, disable fastcgi_param HTTPS.
Must be:
fastcgi_param HTTPS off;