I would recommend using a native 2fa app for Ubuntu. This answer askubuntu.com/a/1460646 recommends keepassxc, which is also a password manager that I personally use for passwords but I’ve not used its 2fa function. I also found this app gitlab.gnome.org/World/Authenticator