RTFM
You have to create device passwords.
https://docs.nextcloud.com/server/10/user_manual/session_management.html#managing-devices
If two-factor authentication is enabled for your account, device-specific passwords are the only way to configure clients. The client will deny connections of clients using your login password then.