How could I answer the twofactor message on Nextcloud Client in Ubuntu

I’m afraid I don’t fully follow what you did and what you’re experiencing.

Which app did you activate?

https://docs.nextcloud.com/server/latest/admin_manual/configuration_user/two_factor-auth.html

See Two Factor Authentication in Nextcloud