I suppose it depends on how secure the password manager is and how much security is built into it. I am using 1Password for most of my 2fa stuff (bar my personal and work office 365, plus Authy for some backup 2fa codes and stuff that won't export). Everything in 1pass is secured using my yubikey.