I’d advice setting up a password store[0] which does allow to get OTP codes right on the same device, but of course, it kinda defeats the purpose of 2FA but I still use it for not so important stuff.
imo, as long as you combine "something you know" and "something you have," the effect is the same. So if you store your 2fa encrypted with a on your computer with a key only you know, it accomplishes the same thing.
Anyone who’s used Apple 2FA on a Mac would be familiar with this - you can take the code from the same computer you’re using to log on to the Apple service.